How to identify a data file contains level and arrays.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinay_renu2001
Participant
Posts: 46
Joined: Wed Sep 28, 2005 9:24 am

How to identify a data file contains level and arrays.

Post by vinay_renu2001 »

Hello,

I have a data file which is extracted from a mainframe system.

Now here is my question:

1. Is there any way to tell whether the data file has arrays and levels in it by looking at the data?

I don't have a Cobol Copy Book/CFD. But, I have a file layout in spread sheet which is telling about the levels and array fields of the data file. I manually typed the metadata in CFF stage. But i couldn't able to view data as i am getting different kinds of error messages.

Here is one eg:

Short read encountered on import; this most likely indicates one of the following possibilities:

2. What does these field pictures represents in mainframe data:


field picture/Type My Assumption


9(2) Numeric/Integer

X(2) Character

V(2) Varchar

9(2)V(2) ?????????


Can any one please advise me on this?

Thanks
Vini
Last edited by vinay_renu2001 on Wed Nov 19, 2008 1:18 pm, edited 1 time in total.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Do yourself a favor and require the COBOL copybook from your mainframe data provider.

You're in for a long and tedious process if you're trying to figure out the layout through trial and error.

Only the person that provided you the layout via spreadsheet can really tell you exactly what the spreadsheet means.

For example:
9(2) probably means numeric, but you really need to know if it is encoded as DISPLAY, COMP, or COMP-3 in order to fully define the metadata for the field.

X(2) probaby means character

V(2) isn't even valid, and very likely doesn't mean varchar... It might be a bad translation of PIC V9(2) (numeric with an implied decimal point, such as .99)

9(2)V(2) isn't valid either, but might be a bad translation for PIC 9(2)V9(2), a numeric with an implied decimal point, such as 99.99

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

Post by ray.wurlod »

And if, as you subject line suggests, there are different levels and there are repeating groups (arrays) then you MUST get information about these. A COBOL file definition is the easiest way - they can email it to you and you can import the table definition (record schema definition) from the COBOL FD on your client machine (where, presumably, you receive your email).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinay_renu2001
Participant
Posts: 46
Joined: Wed Sep 28, 2005 9:24 am

Post by vinay_renu2001 »

Mike & Ray, Thanks for the advises.

Yes, I am going through some tedious process, But it takes me some time to get the copybooks for the files i have.
In this mean time i am trying to make some testing on those files. So, Is there any way to find whether the data file has levels and arrays in it by looking at the data without having copybooks and any file layouts?

In case, If i find that a data file i have doesn't have any levels and arrays, I will try using Sequential file to proceed further.
BTW, the data file i have is ASCI and fixed width format.


Thanks
Vini
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Nope. Without metadata to describe the file contents, it's just a bunch of useless bits and bytes.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I second Mike's "Nope". At best you'd be guessing, unless you have some other kind of document that displays the record layout. But do it properly; insist upon correct technical documentation (that is, a COBOL copybook).

That it takes time is not your fault - they should have provided it up front. Don't be penalized by the project manager.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply