Page 1 of 1

How to identify a data file contains level and arrays.

Posted: Wed Nov 19, 2008 12:27 pm
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

Posted: Wed Nov 19, 2008 1:18 pm
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

Posted: Wed Nov 19, 2008 1:40 pm
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).

Posted: Wed Nov 19, 2008 2:20 pm
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

Posted: Wed Nov 19, 2008 2:54 pm
by Mike
Nope. Without metadata to describe the file contents, it's just a bunch of useless bits and bytes.

Posted: Wed Nov 19, 2008 5:08 pm
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.