Page 2 of 2

Posted: Sun Jan 07, 2007 2:43 pm
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.

Posted: Sun Jan 07, 2007 2:44 pm
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.

Posted: Sun Jan 07, 2007 2:47 pm
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

Posted: Sun Jan 07, 2007 2:51 pm
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.

Posted: Sun Jan 07, 2007 2:57 pm
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.

Posted: Sun Jan 07, 2007 4:50 pm
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.

Posted: Sun Jan 07, 2007 4:57 pm
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.

Posted: Sun Jan 07, 2007 9:41 pm
by ray.wurlod
Not wearing my DataStage hat this week. Maybe someone else can contribute in the meantime.

Posted: Sun Jan 07, 2007 9:56 pm
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.

Posted: Sun Jan 07, 2007 10:04 pm
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.

Posted: Sun Jan 07, 2007 10:24 pm
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.

Posted: Sun Jan 07, 2007 10:37 pm
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.

Posted: Sun Jan 07, 2007 10:39 pm
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: