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

GDG created and referred in same Proc


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
selvaraja

New User


Joined: 04 Apr 2008
Posts: 17
Location: Maryland

PostPosted: Fri Jul 10, 2009 12:39 am
Reply with quote

Hi,

I have PROC where i am creating new generation of GDG in step01 and using the same file in step02 by refereing (+1) in both places.

when i am using this PROC once in job, it runs with out error. but when i use twice it give JCL error.

Proc:
Code:

//CCMTB61S PROC MI09='X', 
//             GDG='(+1)'                                         
//STEP01 EXEC PGM=ARU000,                                       
//             COND=(99,NE)                                       
//CARDS    DD DSN=SOURCE.CARD.FILE,                 
//             DISP=(SHR,KEEP,KEEP)                               
//ATCC      DD DSN=MYGDG.FILE&MI09&GDG,
//             DISP=(NEW,CATLG,DELETE),   
//             DATACLAS=&SP10,           
//             DCB=(RECFM=FB,LRECL=86)   
//STEP02 EXEC PGM=TEST,                             
//             COND=(00,NE)                             
//INFILE      DD DSN=MYINFILE.FILE&MI09, 
//               DISP=(SHR,KEEP,KEEP) 
//ATCC      DD DSN=MYGDG.FILE&MI09&GDG,     
//             DISP=(SHR,KEEP,KEEP)     


JCL:
Code:

// JCLLIB ORDER=(MYDATA.PROCLIB)   
//JOBLIB  DD DSN=MYDATA.LOD,DISP=SHR                   
//JSYT0010 EXEC CCMTB61S,                                         
//         MI09='0'                                               
//JSYT0011 EXEC CCMTB61S,                                         
//         MI09='1'
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: Fri Jul 10, 2009 12:43 am
Reply with quote

What JCL error do you get? Your JCL refers to MYINFILE.FILE0 and MYINFILE.FILE1 as well as MYGDG.FILE0(+1) and MYGDGFILE1(+1) -- you do have them defined correctly?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jul 10, 2009 12:45 am
Reply with quote

selvaraja wrote:
when i am using this PROC once in job, it runs with out error. but when i use twice it give JCL error.


The first time you use the PROC (in the same job) with +1, the second time with +2, the third with +3, and so on, right?
Back to top
View user's profile Send private message
selvaraja

New User


Joined: 04 Apr 2008
Posts: 17
Location: Maryland

PostPosted: Fri Jul 10, 2009 1:02 am
Reply with quote

Robert,

Error message:
ENDED AT CBN3NODE - JCL ERROR CN(INTERNAL)

yes i have defined the files correctly by MYGDG.FILE0(+1) and MYGDGFILE1(+1)

if i run the jobs twice like below it run without error

code:

Job1:

// JCLLIB ORDER=(MYDATA.PROCLIB)
//JOBLIB DD DSN=MYDATA.LOD,DISP=SHR
//JSYT0011 EXEC CCMTB61S,
// MI09='1'

Job2:
// JCLLIB ORDER=(MYDATA.PROCLIB)
//JOBLIB DD DSN=MYDATA.LOD,DISP=SHR
//JSYT0010 EXEC CCMTB61S,
// MI09='0'


superk,
No, i have different GDG files for each Proc call. so it has to be +1 for each time.
Back to top
View user's profile Send private message
selvaraja

New User


Joined: 04 Apr 2008
Posts: 17
Location: Maryland

PostPosted: Fri Jul 10, 2009 1:47 am
Reply with quote

Sorry every one, i have found the issue. it nothing to do with PROC. i have given (99,NE) by typo in STEP01.

//STEP01 EXEC PGM=ARU000,
// COND=(99,NE)

it cause this issue.
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: Fri Jul 10, 2009 2:44 am
Reply with quote

Good to hear it is fixed - thanks for letting us know icon_smile.gif

d
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to read unpacked field created in... DFSORT/ICETOOL 12
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts trying to set return code in PROC JCL & VSAM 15
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
No new posts proc step return code to override in ... JCL & VSAM 3
Search our Forums:

Back to Top