Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8199
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
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us