IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COBOL Layout Expansion


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mheatherton

New User


Joined: 26 Jul 2006
Posts: 4
Location: USA

PostPosted: Wed Jul 26, 2006 10:15 pm
Reply with quote

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
View user's profile Send private message
vijayanand_cse

New User


Joined: 12 Jun 2006
Posts: 13
Location: Chennai

PostPosted: Thu Jul 27, 2006 1:01 pm
Reply with quote

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
View user's profile Send private message
mheatherton

New User


Joined: 26 Jul 2006
Posts: 4
Location: USA

PostPosted: Thu Jul 27, 2006 9:18 pm
Reply with quote

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
View user's profile Send private message
vijayanand_cse

New User


Joined: 12 Jun 2006
Posts: 13
Location: Chennai

PostPosted: Fri Jul 28, 2006 9:30 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top