Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COBOL Layout Expansion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: COBOL Layout Expansion
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    Post subject: Re: COBOL Layout Expansion
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    Post subject: Re: COBOL Layout Expansion
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    Post subject: Re: COBOL Layout Expansion
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us