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
 

 

Variable File Length Method

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Tue Nov 16, 2010 1:37 am    Post subject: Variable File Length Method
Reply with quote

Hi All,

Initially we had a program that used to handle 3 different files A,B,C with same DCB parameters as (LRECL=3004,RECFM=VB) in one particular COBOL program. The differnt files were used by 3 different JCL's referring the same COBOL program.

Now suddenly we are having 2 files A,B with new DCB parameters as (LRECL=4004,RECFM=VB) and the 3rd file with the old DCB i.e. (LRECL=3004,RECFM=VB).

Is is possible for us to handle this situation with the old COBOL program when the output file DCB remains unchanged? Or should we proceed to create a new program instead?

Your expert advices in this regards would be of great help.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 16, 2010 3:27 am    Post subject:
Reply with quote

Hello,

One way is to consider 2 programs - one for the original dcb and another for the new. This may make maintenance/understanding easier.
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Tue Nov 16, 2010 4:36 am    Post subject:
Reply with quote

Hi,

We have that option. But is there no other way to handle this condition in the same program?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Tue Nov 16, 2010 5:29 am    Post subject:
Reply with quote

The new LRECL means you must add at least a DD statement and associated code to handle the file -- even though the files are all variable length, if the maximum record length in the COBOL program does not match the file LRECL, it will cause you problems.
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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