Skip to content

Conversation

@mbeckerle
Copy link
Member

Doesn't work in Daffodil for lack of "V" textNumberPattern feature.

Doesn't work in IBM DFDL for lack of binaryCalendarRep="packed" support.
Also needs dfdl:calendarTimeZone="UTC" because "" is not accepted - this will require changing the test logical data to have "+00:00" on the dates.

Doesn't work in Daffodil for lack of "V" textNumberPattern feature.

Doesn't work in IBM DFDL for lack of binaryCalendarRep="packed" support.
@mbeckerle mbeckerle changed the title Work-in-progress. WIP: First Cut - this doesn't work yet - a work-in-progress. Sep 17, 2019
@mbeckerle
Copy link
Member Author

Ok, to be clear, IBM DFDL has lots of working Cobol capability. What isn't working is my little example here yet. Presumably it can be made to work with a workaround to the issues blocking me.

Copy link
Member Author

@mbeckerle mbeckerle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet ready for prime time.

IBM DFDL doesn't support binaryCalendarRep="packed" so we have to
hack around this using BCD, and surrounding things that create the
leading 0 nibble, and trailing "C" nibble which would exist for packed.
-->
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround isn't working-around yet. There may be a better way to do this.

@smhdfdl
Copy link
Member

smhdfdl commented Sep 18, 2019

@mbeckerle When IBM creates DFDL schema for COBOL, we auto-generate them from the COBOL copybook or program. There is no concept of a date/time data type in COBOL, and that kind of data normally would be represented as string or zoned decimal. We have never needed to generate binaryCalendarRep="packed".

@smhdfdl smhdfdl self-requested a review September 18, 2019 08:26
@smhdfdl
Copy link
Member

smhdfdl commented Sep 18, 2019

@mbeckerle Suggested default properties for COBOL ... as there is no date/time concept in COBOL, there is nothing declared for date/time.

<dfdl:format 
  representation="text" 
  escapeSchemeRef="" 
  ignoreCase="yes" 
  initiatedContent="no"
  alignment="1" alignmentUnits="bytes" 
  textStandardBase="10"  textNumberCheckPolicy="lax"  
  textStandardZeroRep="0" textStandardExponentCharacter="E"
  textStandardDecimalSeparator="." textStandardGroupingSeparator="," 
  textNumberRoundingMode="roundUp"  textNumberRounding="pattern"
  textNumberJustification="right" textPadKind="padChar" textTrimKind="padChar" 
  sequenceKind="ordered"  floating="no"
  textOutputMinLength="0"
  truncateSpecifiedLengthString="no"
  nilValueDelimiterPolicy="both" emptyValueDelimiterPolicy="none"
  documentFinalTerminatorCanBeMissing="no"
  useNilForDefault="yes" 
  choiceLengthKind="explicit" 
  fillByte="%#r00;"
  binaryNumberCheckPolicy="lax" 
  binaryBooleanTrueRep="1" binaryBooleanFalseRep="0"
  textBooleanTrueRep="true" textBooleanFalseRep="false" 
  textBooleanJustification="left" textBooleanPadCharacter="%SP;" 
  lengthKind="explicit" lengthUnits="bytes" 
  binaryNumberRep="binary"
  binaryPackedSignCodes="C D F C"
  outputNewLine="%CR;%LF;" textBidi="no" 
  initiator="" terminator="" 
  separator=""  separatorPolicy="required" separatorPosition="infix" 
  leadingSkip="0" trailingSkip="0" 
/>

@smhdfdl
Copy link
Member

smhdfdl commented Sep 18, 2019

@mbeckerle Consider declaring simple types for all the COBOL PIC types. You can carry some properties on the simple types to avoid duplication. It also makes sense to a someone familiar with COBOL. Example:

	<xsd:simpleType name="PIC9-Comp3__short" dfdl:representation="binary"
		dfdl:binaryNumberRep="packed">
		<xsd:restriction base="xsd:unsignedShort">
			<xsd:minInclusive value="0" />
			<xsd:maxInclusive value="9999" />
		</xsd:restriction>
	</xsd:simpleType>

I can see if IBM can donate the full list of simple types.

@mbeckerle mbeckerle merged commit 2f5d55c into DFDLSchemas:master May 15, 2020
@mbeckerle
Copy link
Member Author

This got closed by accident. Should be reopened.

mbeckerle added a commit that referenced this pull request May 15, 2020
update build.sbt and sbt version

See #1
There are comments on improving this schema there. The PR
was closed accidently, but is still accessible.

This schema is a first cut at some Cobol from daffodil.
It's not complete yet due to limitations in Daffodil.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants