View previous topic :: View next topic
|
Author |
Message |
ssamineni Warnings : 1 New User
Joined: 10 Mar 2007 Posts: 16 Location: India
|
|
|
|
Hi! Can anyone please let me know how to find out the length of a copybook without using file-aid.
We don't have file-aid in our project.We have File Manager.It would be greatful if anyone posts document on how to use file manager. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
One way to get the length of a copybook is to run a compile.
Will this provide what you need? |
|
Back to top |
|
|
ssamineni Warnings : 1 New User
Joined: 10 Mar 2007 Posts: 16 Location: India
|
|
|
|
Thanks for the reply. I have checked listing for the program(Assembler) in Endevor which uses the copybook,but I couldn't find out the length.Could you please provide me some more information on this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Hi!
the issue of finding lengths of structures can be solved :
PL/I if I remember correctly ( I just checked and I DID )
Quote: |
1.4.7 Aggregate length table
An aggregate length table is obtained by using the AGGREGATE option. The table does not include any arrays or structures that have non-constant extents (such as those using REFER). For aggregates with constant extents, the table contains the following information:
* The file and line number where the aggregate is declared.
* The name of the aggregate and each element within the aggregate.
* The byte offset of each element from the beginning of the aggregate. As a word of caution, be careful when interpreting the data offsets indicated in the data length table. An odd offset does not necessarily represent a data element without halfword, fullword, or even double word alignment. If you specify or infer the aligned attribute for a structure or its elements, the proper alignment requirements are consistent with respect to other elements in the structure, even though the table does not indicate the proper alignment relative to the beginning of the table.
* The length of each element.
* The total length of each aggregate, structure, and substructure.
If there is padding between two structure elements, a /*PADDING*/ comment appears, with appropriate diagnostic information. |
Assembler
You must do a little bit of work on Your own
( or have Your organization enforce a standard coding technique )
this is usually done by ( for example )
Code: |
record_layout equ * ( could be ds 0h/0f/0d if You need a specific alignment )
field1 dc/ds <a legal storage definition>
field2 dc/ds <a legal storage definition>
...
...
feldN dc/ds <a legal storage definition>
record_layout_length equ *-record_layout ( it' s a minus )
|
and record_layout_length will be equated to the length of Your structure
I dislike COBOL so I will not give any suggestions about it
regards
e.s |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
ssamineni wrote: |
Thanks for the reply. I have checked listing for the program(Assembler) in Endevor which uses the copybook,but I couldn't find out the length.Could you please provide me some more information on this. |
From the listing, the length can be determined from the difference between the last byte and the first byte of the copybook expansion. You can subtract hex, can't you?
File Manager for z/OS V5R1 User?s Guide |
|
Back to top |
|
|
rz061m
New User
Joined: 03 Mar 2006 Posts: 48 Location: Chennai
|
|
|
|
hi ssamineni,
Goto option 13 and give the PDS and member name of your copybook and this will give the length of the copybook along with the starting and ending position of all the fileds.
Also i dont remember the option in which this 13th option lies. So please take some time to go thru the main panel options one by one to see the screen that has option 13.
Hope i am not confusion you, its been long time since i worked in file manager. |
|
Back to top |
|
|
martin7658
New User
Joined: 05 May 2007 Posts: 1 Location: China
|
|
|
|
Hello
I have a ideal that use Mainframe tools ,IBM File manager or DITTO to find out file length.
IBM File manager ,goto S.E.7 on main panel. |
|
Back to top |
|
|
|