Mainframe CopyBook question
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
Mainframe CopyBook question
Hi,
Has anyone had issues importing copyvbooks with negative definitions?
05 VRUPB1-TOT-XFER-OUT-AMT PIC -9(9).99.
and
05 VRUPB1-TOT-XFER-OUT-AMT PIC S9(9).99.
both fail on importing the table definition. with the following:
ERROR 1 (line 28): 'PIC' PICTURE character string format is invalid.
Thanks - - John
Has anyone had issues importing copyvbooks with negative definitions?
05 VRUPB1-TOT-XFER-OUT-AMT PIC -9(9).99.
and
05 VRUPB1-TOT-XFER-OUT-AMT PIC S9(9).99.
both fail on importing the table definition. with the following:
ERROR 1 (line 28): 'PIC' PICTURE character string format is invalid.
Thanks - - John
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
OK... been quite some time since I've had any hands-on time with COBOL, for whatever reason that just looked wrong to me. Guess not. ![Sad :(](./images/smilies/icon_sad.gif)
However, I do think there was some recent discussions that the importer doesn't like the "-" syntax but the "S" one should be fine. Let me see if I can find that...
![Sad :(](./images/smilies/icon_sad.gif)
However, I do think there was some recent discussions that the importer doesn't like the "-" syntax but the "S" one should be fine. Let me see if I can find that...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I've never been able to get "." to work with signed decimal numbers (those beginning with "S") which I've mainly used. That's why I thought that only "V" is valid.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
The difference between explicit decimal -- 9(x).9(x) -- and implied decimal -- 9(x)V9(x) -- is in the physical storage of the field on the original record. An explicit decimal takes a byte of storage. Any numeric with a virtual decimal looks the same in storage regardless of the location of the virtual decimal.
The easy workaround for non-binary numerics -- no "COMP" clause of any type on the PIC statement -- is to read them as alphanumeric with positions provided for the decimal and the sign. You must then parse/convert them back to decimal in a transformer stage after input.
For example: PIC -9(9).9(02) can be read as PIC X(13), edited for the leading sign, and either parsed using the decimal as the delimiter or converted directly to decimal.
In COBOL terminology, and non-binary numeric is labelled "DISPLAY". That DataStage cannot handle it is ridiculous from my personal POV, but there it is.
The easy workaround for non-binary numerics -- no "COMP" clause of any type on the PIC statement -- is to read them as alphanumeric with positions provided for the decimal and the sign. You must then parse/convert them back to decimal in a transformer stage after input.
For example: PIC -9(9).9(02) can be read as PIC X(13), edited for the leading sign, and either parsed using the decimal as the delimiter or converted directly to decimal.
In COBOL terminology, and non-binary numeric is labelled "DISPLAY". That DataStage cannot handle it is ridiculous from my personal POV, but there it is.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872