Getting RBA of a record read in an ESDS file



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

Getting RBA of a record read in an ESDS file

Postby kerembenli76 » Mon Jan 30, 2012 9:11 pm

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.
kerembenli76
 
Posts: 5
Joined: Mon Jan 30, 2012 9:09 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby BillyBoyo » Mon Jan 30, 2012 9:28 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

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

Postby kerembenli76 » Tue Jan 31, 2012 2:39 pm

@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..
kerembenli76
 
Posts: 5
Joined: Mon Jan 30, 2012 9:09 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Tue Jan 31, 2012 8:56 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post