View previous topic :: View next topic
|
Author |
Message |
rohit jaiswal Warnings : 2 New User
Joined: 09 Mar 2006 Posts: 36 Location: hyderabad,A.P
|
|
|
|
hi
i have a problem and hope to get a solution here.
i have to create a jcl in such a way that it reads a file which has few members and according to the members present i have to create the gdg's for that member name. all the gdg's that are going to be created has the same properties.
for example if the member name is abc then i have to create a gdc with name abc and also it versions.
regards
rohit |
|
Back to top |
|
|
vanji
New User
Joined: 26 Dec 2005 Posts: 7 Location: pune
|
|
|
|
//GDGCRE JOB(DVLYD,DEV),'CRTE GDG',
// CLASS=S,
// MSGCLASS=T,
// MSGLEVEL=(1,1),
// REGION=4M
//PRC JCLLIB ORDER=MY.DATASET.FOR.PROC(GIVE WERE UR PROC LIES)
//GDG4 EXEC GDGC, (u should give the member name in that particular proc were ur GDG creation code lies)
// NOPRINT='*',
// DUMP='*'
// GDGNAME='ABCD'
//*
Here is the proc luks like this in MY.DATASET.FOR.PROC
//GDGC PROC NOPRINT='',
// DUMP=''
// GDGNAME=''
//*
//********************************************************************
//STEP010 EXEC PGM=IDCAMS,
// COND=(0,NE)
//********************************************************************
//*
//SYSOUT DD SYSOUT=&NOPRINT
//SYSPRINT DD SYSOUT=&NOPRINT
//SYSDBOUT DD SYSOUT=&DUMP
//SYSUDUMP DD SYSOUT=&DUMP
//*
DEFINE GDG -
(NAME(MY.GDG.&GDGNAME) -
SCRATCH -
LIMIT(31))
//* |
|
Back to top |
|
|
rohit jaiswal Warnings : 2 New User
Joined: 09 Mar 2006 Posts: 36 Location: hyderabad,A.P
|
|
|
|
hi vanji
thanks for the quick response but i think this is not going to help me as i have to read a file and depending on the member name i have to create a gdg with that name. can u please explain me the jcl which u have sent as it is not clear to me.
regards
rohit |
|
Back to top |
|
|
Sathyan_pune
New User
Joined: 27 Mar 2006 Posts: 2 Location: Pune
|
|
|
|
Hi Rohit,
U can do this with the help of cobol Program and internal reader
OPEN INPUT SYS101
OUTPUT SYS201
MOVE '//jobname JOB...........' TO SYS210-REC.
WRITE SYS201-REC.
MOVE'//Stepname EXEC PGM=IDCAMS' TO SYS201-REC.
WRITE SYS201-REC.
MOVE '//SYSPRINT DD .....' TO SYS201-REC.
WRITE SYS201-REC.
MOVE '//SYSIN DD *' TO SYS201-REC.
WRITE SYS201-REC.
READ SYS101 .....
MOVE ' DEFINE GDG( -' TO SYS201-REC.
WRITE SYS201-REC.
MOVE ' NAME(' TO X-REC(1:6).
MOVE MEM-NAME OF SYS101-REC TO X-REC(7 : ??).
MOVE ' ) -' TO X-REC(7 + ?? + 1 : 4).
WRITE SYS201-REC FROM X-REC.
...
...
...
In JCL
...
...
...
//SYS201 DD SYSOUT=(*,INTRDR)
...
...
Regards
Sat |
|
Back to top |
|
|
|