Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving / copy a gdg 1

Status
Not open for further replies.

JebusRocks

Programmer
Sep 14, 2004
30
CA
Hello all

I am making changes to a cobol program that uses a GDG. Currently I want to run the program in our test environment but run into a problem in that there is not a copy of the GDG in 'test'. Before I go to my 'senior programmer' with this problem I am wondering if anyone can tell me how does one make a copy of a gdg and move to a 'test' location

Thanks
 
You need to have a "GDG Base" built with some other Dataset name. Most shops use the first 3 or 4 characters to identify, among other things, whether the dataset is Dev, Test, Quality Assurance, or Prod.

In fact - if the GDG Dataset is a Production Dataset, there may already be a GDG Base for a test version. If not, find someone who can create a GDG Base for you.

Hope that helps.
 
Hi,
If you do not already have a version of the GDG in test, then you can use an Idcams job to define the base GDG as follows:
//STEP1 EXEC PGM=IDCAMS
//SYSIN DD *
DEFINE GDG (NAME(TEST.GDG.BASE) LIMIT(5) SCRATCH)
/*

Once done, you can then define the dataset as NEW and (+1) in the JCL giving the relevant file length parms etc.

Hope this helps,

Marc
 
You're not REQUIRED to use a GDG in your unit testing. You can copy the prod GDG to a regular PS ds (call it anydsn.IN or some such; call your O/P anydsn.OUT.)

If you have to do a QA level test the base s/b there already, if not, build it as suggested.


Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 
Something like this?
(untested JCL!!...I don't work with mainframes anymore!)
Code:
//MYJOB JOB MYJOB,'HELLO',
//          CLASS=A,NOTIFY=ME,USER=ME
//*
//JS0010 EXEC PGM=IEBCOPY
//*
//SYSPRINT DD SYSOUT=*
//FROM DD DSN=PROD.GDG(0),
//        DISP=SHR
//TO   DD DSN=MY.TEST.PS,
//        DISP=(NEW,CATLG,DELETE),
//        SPACE=(TRK,(10,20),RLSE),
//        UNIT=SYSDA
//SYSIN DD *
 COPY INDD=FROM,OUTDD=TO
//
 
You need one more line in the JCL.

In the TO DD Statement you need a DCB card, such as

// DCB=(RECFM=FB,LRECL=999,BLKSIZE=9999)

Where RCFM=FB means the file is a Fixed Block File
Where 999 is the record length
Where 9999 is the Blocking Factor

Note: If format is Variable blocked, use VB
Also, in some shops BLKSIZE can be omitted and
is defaulted to "half-track" blocking

Hope that helps
 
Thanks for all the replys they have been a great help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top