MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Referring to GDG file name passed from PARM

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
santa
Beginner


Joined: 16 Mar 2007
Posts: 3
Topics: 3

PostPosted: Tue Jul 15, 2008 6:08 am    Post subject: Referring to GDG file name passed from PARM Reply with quote

Hi,

I am trying to make a generic job which will create a GDG base and the next file version. I wish to pass GDG file through parm while creating both GDG base using IDCAMS and Next version using IEBGENER.

As a work around, i tried creating a PASS file with the name same as that of GDG base to be created. This file will not have any space allocated for it. Then use the DD name for file in IDCAMS instream command and create GDG.

//STEP010 EXEC PGM=IDCAMS
//GDGMOD1 DD DSNAME=COSBATCH.OT22115D.SGSFEED,
// DISP=(,PASS),
// SPACE=(TRK,(0)),
// DCB=(RECFM=&RECFM,BLKSIZE=&BLKSIZE,LRECL=&LRECL)
//SYSPRINT DD SYSOUT=&SOUT
//SYSIN DD DSN=COSO110.APPL.PARMS(&PARM1),
// DISP=SHR



Parm 1:

DELETE GDGMOD1 GDG
IF MAXCC LT 9 THEN SET MAXCC = 0
DEFINE GDG(NAME(GDGMOD1) -
LIMIT (7) -
NOEMPTY -
SCRATCH )

However, I am encountering following error messages:


DEFINE GDG(NAME(GDGMOD1) -
LIMIT (7) -
NOEMPTY -
SCRATCH )
IDC3018I SECURITY VERIFICATION FAILED
IDC3009I ** VSAM CATALOG RETURN CODE IS 56 - REASON CODE IS IGG0CLFT-6
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12


IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12


I am not sure if the approach taken is correct here. Can you please enlighten me on the nature of problem and possible solutions Idea
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Tue Jul 15, 2008 6:29 am    Post subject: Reply with quote

Why do you want to delete the GDG base and redefine it every time ?

If you are hoping to use the GDGMOD1 DD name as a reference to be used by the IDCAMS statements, then it will not work, which probably explains the RACF error that you get, as there is probably no profile for resource GDGMOD1.

To be honest, I'm not sure that the delete would work if there were any generations of the GDG in existence. You would probably need to have the FORCE and/or PURGE parameters, and also the authority to use them.

You could use REXX as an easy way

//REXXSTEP EXEC PGM=IKJEFT01,PARM='gdg base name'

To do the following
a) Check to see if the base already exists
b) Act accordingly if (a) = Y
c) Define the GDG base
d) Define the G0001V00 dataset

Gentle hint
Quote:
I am trying to make a generic job which will create a GDG base and the next file version.

I believe that the term you really wanted to use was generation rather than version bonk
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group