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

Variable File Length Method


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Nov 16, 2010 3:27 am
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 16, 2010 5:29 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top