View previous topic :: View next topic
|
Author |
Message |
mheatherton
New User
Joined: 26 Jul 2006 Posts: 4 Location: USA
|
|
|
|
I am trying to convert (expand) a COBOL Input/Output Layout that is brought into a program from a library using "Include".
I am adding two ten character byte fields. In the common areas, no problem as far as the expansion goes. The problem is that there are some variable length field that are utilized through an Occurs Depending clause.
What is the suggestion on how to shift this 20 bytes within the layout.
Note: You may have seen this exact same question posed in the JCL Forum. That was inadvertant.
Thanks |
|
Back to top |
|
|
vijayanand_cse
New User
Joined: 12 Jun 2006 Posts: 13 Location: Chennai
|
|
|
|
Hi,
The problem explained by you is not clear. Can you mention your copybook layout which you are using and expalain the problem in more detail?
Regards
Vijay |
|
Back to top |
|
|
mheatherton
New User
Joined: 26 Jul 2006 Posts: 4 Location: USA
|
|
|
|
I'll be happy to elaborate. First allow me to specify that I am in Government.
I work in a "Service" oriented State Agency. The COBOL Layouts are generally used as the Output FD but could be used as an input, and is used by more than one section associated with providing the specific services. Because the records are used in multiple work sections rather than a programmer having to code that same layout over and over again for each program using that Record Layout, the section responsible for that "system" will code a layout that is moved into a Library meant to hold other layouts and introduced into the various pertinent programs by calling the layout using ++Include.
My question was merely, two fields (10 bytes each) were added to this specific layout by Federal mandate. The problem is that because the layout is shifted a total of 20 bytes in the common area of the layout by virtue of the movement it will also need to shift the variable portion of the record also by 20 bytes. This variable portion is driven by an OCCURS DEPENDING ON (using a fixed field within the Layout) What I am asking for is suggestions on how to move the variable portion of this layout. I am thinking about using a PERFORMING VARYING with a subscript specified the same as the dependent on the OCCURS.
Any thoughts? |
|
Back to top |
|
|
vijayanand_cse
New User
Joined: 12 Jun 2006 Posts: 13 Location: Chennai
|
|
|
|
Hi,
In your layout if you have any filler at the bottom, you can reduce it according to your new field length. If you are inserting the fields in the middle of the copybook, then you have to alter the program also accordingly. Because the value which you have accessed in, say for example, 40th byte now available in 60th byte. So please change your code accordingly.
Regards
Vijay |
|
Back to top |
|
|
|