can we maintain 2 generations with different Lengths in Same
GDG ?

Answer Posted / vishal

Yes, we can definitely have different GDG versions with
different LRECL. e.g. in the below change the LRECL to as
per your needs and each time it will generate the GDG
version with the LRECL provided.

//DD1 DD DSN=BASEG(+1),DISP=(NEW,CATLG,CATLG)
DCB=(MODELNAME,LRECL="WHAT U WANT"

However, there is a catch. If the GDG is being updated by a
program then whatever length has been declared in the
program (of the file corresponding to DD1), the GDG version
will have that same length, irrespective of the length
declared in the JCL.

Note: I guess if the length declared in the Program is
greater than that LRECL given in the JCL then we may face
JCL errors but I am not sure of this. SomEene can check and
let everyone know.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the function of job statement in jcl?

653


which parameter is use to declare the name of dataset in dd statement?

739


Does jcl support automatic restart?

763


Explain the function of dd name parameter with a 2 part structure; audit.report?

905


in ways data can be passed to a COBOL program from JCL?

669






How can return codes be tested before execution of a job step?

929


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

1738


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

720


What is the function of the dd avgrec keyword in sms datasets?

843


if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

1621


In job processing, what happens in conversion stage?

745


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

1972


Explain how can values be passed from the job stream to an executable program?

632


When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

940


what is DSN parameter and DISP parameter is used for?

680