Page 1 of 1

Getting RBA of a record read in an ESDS file

PostPosted: Mon Jan 30, 2012 9:11 pm
by kerembenli76
Hi,

a need the RBA value of a specific record in an ESDS file using COBOL, in order to solve an urgent Production problem.

I read the file sequentially from the beginning until i reach this record and i want to log its RBA value into another file.

When i searched the net, i couldn't find a way or command to do that..


Alternatively,
I tried summing record lengths of the records all the way through, but id didn't work.
I think i have to add some more values for each 4096 bytes, but i couln't generate an exact formula for that.


Can you please recommend a way to get this RBA value..
I'd appreciate any help.

Thanks in advance.

Re: Getting RBA of a record read in an ESDS file

PostPosted: Mon Jan 30, 2012 9:28 pm
by BillyBoyo
IDCAMS PRINT will show you the RBA of a record. Either print the whole lot and find your record in the output, or put some parameters on to go to the record/close to the record you want.

Re: Getting RBA of a record read in an ESDS file

PostPosted: Tue Jan 31, 2012 2:39 pm
by kerembenli76
@BillyBoyo, thank you for fast reply.

That's a solution that might be of help for me..

The problem is that, i have 10 ESDS files which contains thousands of records.
And the target record i mentioned (which indicates end-of-day start point) is located at different positions in each file.

Browsing each file and finding the number of skip count for display is reather time consuming for me..
Since this is an urgent Production problem, i don't have enough time to solve it when it occurs.

Is there any method which i can get this RBA value in a Cobol program?
I will provide the input file, read it until i reach target record and display rba value of the current record..

Re: Getting RBA of a record read in an ESDS file

PostPosted: Tue Jan 31, 2012 8:56 pm
by BillyBoyo
If you have some way of idetifying your record(!) you should be able to count the bytes up to that point if you want to know how many there are.

For "fixed" (max = min) records, no x size will give it. For max ne min, you'll have to add up the "record lengths" by using RECORD IS VARYING, for instance.