Page 1 of 1

Create a GDG base using REXX

PostPosted: Thu Aug 21, 2008 11:45 am
by dudu325
Hi All,

Could anyone help me to create a GDG base using REXX? I also want to check the return code that is whether the base is already catalouged or not.

Thanks,

DD

Re: Create a GDG base using REXX

PostPosted: Thu Aug 21, 2008 5:21 pm
by MrSpock
15.0 Topic 15. DEFINE GENERATIONDATAGROUP from the z/OS V1R7.0 DFSMS Access Method Services for Catalogs manual.

For example:
/* REXX */
x = Outtrap(x.)
"DEF GDG (NAME('MY.GDG') LIM(3) NEMP NSCR)"
x = Outtrap(Off)
Say rc

Re: Create a GDG base using REXX

PostPosted: Fri Aug 22, 2008 5:23 pm
by expat
/* REXX */
x = Outtrap(x.)
"DEF GDG (NAME('MY.GDG') LIM(3) NEMP NSCR)"
x = Outtrap(Off)
Say rc

I would use a default of SCRATCH rather than NOSCRATCH, after all, we wouldn't like to leave the redundant generations on DASD, would we ?

Re: Create a GDG base using REXX

PostPosted: Mon Apr 27, 2009 6:37 pm
by kuldeep negi
i tried your code and it is working fine. but i want the input from user so i have written one code for it but it is not working.

the GDG is not getting created
can anyone suggest?

/* REXX */
ARG GDG
CLS
Y = MSG(OFF)
IF GDG = ' ' THEN
DO
SAY 'ENTER THE GDG NAME:'
PULL GDG
END
X = OUTTRAP(X.)
"DEF GDG (NAME('GDG') LIM(3) NEMP NSCR)"
X = OUTTRAP(OFF)
SAY RC

Re: Create a GDG base using REXX

PostPosted: Mon Apr 27, 2009 6:52 pm
by MrSpock
First, make sure your code is syntactiaclly correct (it isn't). Then, post a real runtime TRACE of your code.

Re: Create a GDG base using REXX

PostPosted: Mon Apr 27, 2009 7:01 pm
by kuldeep negi
do u want the error message? i didnt get what exactly you are asking for.

Re: Create a GDG base using REXX

PostPosted: Mon Apr 27, 2009 7:06 pm
by kuldeep negi
i checked my code and it is taking the gdg name from the user correctly.
but it is not allocating it. please advice.

Re: Create a GDG base using REXX

PostPosted: Mon Apr 27, 2009 7:56 pm
by MrSpock
Notice the content of your program when viewed from an ISPF Edit session:

/* REXX */
ARG GDG Notice that the REXX instruction is highlighted in RED while the variable is kept unhighlighted in the normal GREEN.
...
SAY 'ENTER THE GDG NAME:' Same here. Note how the instruction is highlighted in RED while the literal string is left highlighted in a contrasting white color.

PULL GDG Same highlighting here.
...

If GDG is the name of the variable that contains the actual name entered by the user, then it must remain outside of the literal string and be shown in it's correct unhighlighted state:

"DEF GDG (NAME('"GDG"') LIM(3) NEMP NSCR)"