Read data from IBM mainframe



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Read data from IBM mainframe

Postby polis » Wed Aug 15, 2007 10:10 pm

Hi all,
I am not a programmer but I thought this is the best place to ask a question I have. I am trying to access some data which are files with the extension .dat . There are two files that contain numbers and one file called test which has 3 lines with unknown to me information:

VOL1000010
HDR1EGBS.ERIM.VIEWING00001000010001 89065 993650000000IBM OS/VS 370
HDR2F234520004140TEGBEAKA/PERS0200 B 86986

I have a codebook for the data which says that the records are 62 characters and instead the files have rows with 39 characters. The information above makes me believe that this data (which is very old) comes from some IBM mainframe and maybe it needs some kind of "decoding" to read it in a program like SAS or Excel or R.

Any help would be greatly appreciated,

Thank you,
Polis Pavlidis
Simon Graduate School of Business
polis
 
Posts: 3
Joined: Mon Aug 13, 2007 6:25 am
Has thanked: 0 time
Been thanked: 0 time

Re: Read data from IBM mainframe

Postby CICS Guy » Wed Aug 15, 2007 10:55 pm

polis wrote:VOL1000010
HDR1EGBS.ERIM.VIEWING00001000010001 89065 993650000000IBM OS/VS 370
HDR2F234520004140TEGBEAKA/PERS0200 B 86986
This is an IBM tape volume header created early March 1989
I have a codebook for the data which says that the records are 62 characters and instead the files have rows with 39 characters. The information above makes me believe that this data (which is very old) comes from some IBM mainframe and maybe it needs some kind of "decoding" to read it in a program like SAS or Excel or R.
I don't know about the rows of 39 characters, but if the records are 62 characters long, you should be able to see a repeating pattern in the data.
Do you think you could show a character or hex representation of a couple rows?
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: Read data from IBM mainframe

Postby dick scherrer » Wed Aug 15, 2007 11:47 pm

Hello,

If you post the first ten or so "records" from the 2 files with "numbers" we may be able to offer suggestions.

It is very possible that the smaller of the 2 files will have something that has "EOF" or EOV" near the left side of the record.

What platform are you working on with the data? If you are on a win-based pc, copy the files and change them to a .txt extension and you should be able to see them in notepad.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Read data from IBM mainframe

Postby polis » Mon Aug 20, 2007 10:54 pm

Thank you very much for your reply, I wasn't sure there would be any.
Here are the first few lines of the files:

011000401187215000000000000000000000000
011000401187216000000000000000000000000
011000401187217000000020000000003700372
011000401187218000000000000000000000000
011000401187219000000000000000001690169
011000401187220000000000000000000000000
011000401187221000000000000000000000000
011000401187222000000000000000000000000
011000401187223000000000000000000000000
011000401187224000000000000000000000000
011000401187225000000000000000000000000
011000401187226000{000{008I000{017A026{
011000401187227000000000000000000000000
011000401187228000000000000000000000000

I included all these lines to show you the brackets that show up in some rows.

I realized that the two files contain exactly the same information which is also a puzzle to me.
I do work on a win-based pc and a simple text file would be good for me to read in. However, when I save the files as txt and try to interpret the data along the lines described in the codebook, I can't. That's why I thought there might be some kind of coding needed.
Again, any help would be appreciated,

best regards,
Polis Pavlidis
polis
 
Posts: 3
Joined: Mon Aug 13, 2007 6:25 am
Has thanked: 0 time
Been thanked: 0 time

Re: Read data from IBM mainframe

Postby polis » Mon Aug 20, 2007 11:03 pm

I just noticed that the last row of the second file has some different information, here are the last rows of the second file, the first file is exactly the same but without the very last "different" row.

022070681288225000000000000000000000000
022070681288226000000000000000000000000
022070681288227000000000000000000000000
022070681288228000000000000000000000000
022070681288229000000000000000000000000
022070681288230000000000000000000000000
214.8u 52.4s 10:58 40% 0+408k 3+1io 3pf+0w
polis
 
Posts: 3
Joined: Mon Aug 13, 2007 6:25 am
Has thanked: 0 time
Been thanked: 0 time

Re: Read data from IBM mainframe

Postby dick scherrer » Mon Aug 20, 2007 11:52 pm

You're welcome :) We try to keep an eye on this forum while it is still in beta-test. Soon there will most likely be much more traffic.

011000401187219000000000000000001690169
.
.
011000401187225000000000000000000000000
011000401187226000{000{008I000{017A026{
The { is a plus-zero - the } (if any) is a negative zero. The letters A-I are positive 1-9 and the letters J-R are negative 1-9.

What you have is basically a text file with "signs" on some of the numeric fields. The data you show has no delimiters, so to use them, you will need to "mark" the field boundaries (maybe the codebook will tell field lengths).

Can you get the file re-created by whoever provided it? If they could send a tab-delimited file with the numerics expanded to show the minus sign, it will be much easier for you to use.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post