calculation of offset

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

calculation of offset

Postby ananta2006 » Wed Apr 08, 2009 3:51 pm

hi all

I need to do ' to calculate the offset value of each field of a copybook'

means I need to see the offset value of each field of copybook through the coding'

I am not able to use file aid to use this. so that I need to do this code .

its output should comes like this....

ws-name , ws-age , ws-salary
(1:20) , (22:24) , (26:32)

like this in output file or in spool..
Posts: 1
Joined: Wed Apr 08, 2009 2:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: calculation of offset

Postby dick scherrer » Thu Apr 09, 2009 1:33 am


As you were told in the other forum, you can use fileaid. If something in your organization prevents this, it is an issue for your manager to resolve. . .

To get the offsets for a copybook you can also simply run a compile and the offsets will be shown n the compile output.

If anyone n your organizaton is familiar with easytrieve, there is an easytrieve macro (CBLCNVRT) that will convert a cobol copybook to an easytrieve layour which contains offsets.

Posting in both forums can cause a user to be banned. . .
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to IBM Cobol


  • Related topics
    Last post