Create a GDG base using REXX



IBM's Command List programming language & Restructured Extended Executor

Create a GDG base using REXX

Postby dudu325 » Thu Aug 21, 2008 11:45 am

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
dudu325
 
Posts: 2
Joined: Thu Aug 21, 2008 11:14 am
Has thanked: 0 time
Been thanked: 0 time

Re: Create a GDG base using REXX

Postby MrSpock » Thu Aug 21, 2008 5:21 pm

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
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Create a GDG base using REXX

Postby expat » Fri Aug 22, 2008 5:23 pm

/* 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 ?
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Create a GDG base using REXX

Postby kuldeep negi » Mon Apr 27, 2009 6:37 pm

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
kuldeep negi
 
Posts: 21
Joined: Mon Apr 27, 2009 3:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Create a GDG base using REXX

Postby MrSpock » Mon Apr 27, 2009 6:52 pm

First, make sure your code is syntactiaclly correct (it isn't). Then, post a real runtime TRACE of your code.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Create a GDG base using REXX

Postby kuldeep negi » Mon Apr 27, 2009 7:01 pm

do u want the error message? i didnt get what exactly you are asking for.
kuldeep negi
 
Posts: 21
Joined: Mon Apr 27, 2009 3:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Create a GDG base using REXX

Postby kuldeep negi » Mon Apr 27, 2009 7:06 pm

i checked my code and it is taking the gdg name from the user correctly.
but it is not allocating it. please advice.
kuldeep negi
 
Posts: 21
Joined: Mon Apr 27, 2009 3:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Create a GDG base using REXX

Postby MrSpock » Mon Apr 27, 2009 7:56 pm

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)"
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post