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.
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.
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.