Misaligned Records after reading Mainframe File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

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....
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

ray.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.
I have manually imported the table defs into the repository. Please go to this topic to see more about it. viewtopic.php?t=106474
Attitude is everything....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Manually, OK, but from where?!!

Somewhere there exists documentation, almost certainly in COBOL FD format, of what the COBOL program works with.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

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.
I created the table defs from the following info.
Last edited by just4geeks on Fri Jan 12, 2007 6:40 pm, edited 1 time in total.
Attitude is everything....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

ray.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?
AN- alphanumeric
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....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not wearing my DataStage hat this week. Maybe someone else can contribute in the meantime.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There are weeks when you don't wear your DataStage hat? :shock: [/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:

Code: Select all

01 BIG_RECORD.
  05 FIELD_ONE              PIC S(9)V99 COMP-3.
  05 FIELD_TWO              PIC X(4).
Yes, no, maybe so? That's what would be most helpful here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

chulett wrote:There are weeks when you don't wear your DataStage hat? :shock: [/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:

Code: Select all

01 BIG_RECORD.
  05 FIELD_ONE              PIC S(9)V99 COMP-3.
  05 FIELD_TWO              PIC X(4).
Yes, no, maybe so? That's what would be most helpful here.

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....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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. :wink:

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

chulett wrote:There are weeks when you don't wear your DataStage hat? :shock: [/boggle] Say it ain't so!
I also have UniVerse and Red Brick hats. See my web site.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:I also have UniVerse and Red Brick hats. See my web site.
I know... just figured you wore them all at the same time. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply