Misaligned Records after reading Mainframe File
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I would expect, given that it's mainframe data, that you can get the COBOL FD from them - and you (or someone else) would probably have imported the table definitions into DataStage Repository from it.
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.
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
I am marked this topic "Resolved" since the topic name doesn't reflect my problem anymore. I have created another topic viewtopic.php?t=106474. I had to do this to avoid confusion with so many posts in this topic.
Attitude is everything....
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
I have manually imported the table defs into the repository. Please go to this topic to see more about it. viewtopic.php?t=106474ray.wurlod wrote:I would expect, given that it's mainframe data, that you can get the COBOL FD from them - and you (or someone else) would probably have imported the table definitions into DataStage Repository from it.
Attitude is everything....
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
I created the table defs from the following info.ray.wurlod wrote:Manually, OK, but from where?!!
Somewhere there exists documentation, almost certainly in COBOL FD format, of what the COBOL program works with.
Last edited by just4geeks on Fri Jan 12, 2007 6:40 pm, edited 1 time in total.
Attitude is everything....
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I presume the numeric piece is width (number of character positions within the file), but what do "AN", "BI", "NUM" and "P" mean?
This is a highly unconventional representation.
This is a highly unconventional representation.
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.
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
AN- alphanumericray.wurlod wrote:I presume the numeric piece is width (number of character positions within the file), but what do "AN", "BI", "NUM" and "P" mean?
BI-binary
NUM-Display Numeric
P-COMP 3 Packed
The table defs have all been created. You can take a look at it by importing the job from http://www.yousendit.com/download/2VfiCAhRwLh5TA%3D%3D.
Please enable pop-up blocker before downloading.
Attitude is everything....
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are weeks when you don't wear your DataStage hat? [/boggle] Say it ain't so!
Never really played much with the CFF stage or I'd give it a shot. Would have been nice to get a proper COBOL FD posted. Just4, no-one gave you anything with levels and proper COBOL field definitions in it? Anything goofy like:
Yes, no, maybe so? That's what would be most helpful here.
Never really played much with the CFF stage or I'd give it a shot. Would have been nice to get a proper COBOL FD posted. Just4, no-one gave you anything with levels and proper COBOL field definitions in it? Anything goofy like:
Code: Select all
01 BIG_RECORD.
05 FIELD_ONE PIC S(9)V99 COMP-3.
05 FIELD_TWO PIC X(4).
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
chulett wrote:There are weeks when you don't wear your DataStage hat? [/boggle] Say it ain't so!
Never really played much with the CFF stage or I'd give it a shot. Would have been nice to get a proper COBOL FD posted. Just4, no-one gave you anything with levels and proper COBOL field definitions in it? Anything goofy like:
Yes, no, maybe so? That's what would be most helpful here.Code: Select all
01 BIG_RECORD. 05 FIELD_ONE PIC S(9)V99 COMP-3. 05 FIELD_TWO PIC X(4).
What does FD stand for? File Description? And no, I did not get anything like you said.
For example, I got something like this.,
REC-TYPE 2/BI
ID 14/AN
And I manually inserted it. BI-Binary, AN-char.
While entering I realised that the Levels would get automatically inserted.
Attitude is everything....
Yup, FD is File Definition or File Description, take your pick. In all the years I did COBOL I don't recall ever seeing notation like someone gave you - unless they though it was all you needed. Suggest you go back to your source and ask for the FD, they should know what it is and be able to supply it. The CFF stage will thank you.
As an example, I Googled this up - a loverly little FD from some COBOL to SAS site:
As an example, I Googled this up - a loverly little FD from some COBOL to SAS site:
Code: Select all
FD PAYMENT-FILE
LABEL RECORDS ARE OMITTED.
*
01 PAYMENT-RECORD.
05 ACCOUNTS.
10 MONTHLY-PAYMENT
PICTURE IS 9(6)V99
USAGE IS COMP-3
OCCURS 1 TO 12 TIMES DEPENDING ON CURRENT-MONTH.
10 CUSTOMER-INFO.
15 NAME.
20 FIRST PIC X(30).
20 MI PIC X(1).
20 LAST PIC X(30).
15 ADDRESS PIC X(80).
05 LEDGER.
07 BALANCE-INFO OCCURS 4 TIMES.
10 RCVBLE.
15 LAST-AMOUNT-PAID PIC 9(4)V99
COMP-3.
15 PAYMENT-DATE USAGE DISPLAY
PIC XXXXXX.
15 REMAINING-BALANCE PIC 9(4)V99
USAGE
COMP-3.
-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: