View previous topic :: View next topic
|
Author |
Message |
ayansau
New User
Joined: 22 Jun 2007 Posts: 42 Location: Chennai
|
|
|
|
I have a code in REXX, and I am passing some dataset through JCL..
Code: |
//JSTY0010 EXEC PGM=IKJEFT01,
// DYNAMNBR=20,
// PARM='MYREX3'
//SYSEXEC DD DSN=&ISK..xxxxxxxx.MYUTLTY.REXXLIB,
// DISP=(SHR,KEEP,KEEP)
//INDD DD *
xxxxxxxx.xxxxxxxx.TESTGDG(0)
xxxxxxxx.xxxxxxxx.JOBLOG1
xxxxxxxx.xxxxxxxx.JOBLOG
/*
//TEMPDD DD SYSOUT=*
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=* |
I need to convert the relative name to its absolute name.
Is there any way to (any utility) that can convert this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
search the net with "rexx realname"
You will find a link to ...sillysot.... with a function to return what You are looking for |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Try
Code: |
X = LISTDSI("ddname FILE")
DSname = SYSDSNAME
|
Ooooops, just noticed that you are using the Dsn as instream data.
Try doing LISTCAT on the GDG base.
Code: |
GDG = "GDG base name"
DSN = STRIP(GDG!!".G0000V00")
X=OUTTRAP(LST.)
" LISTC ENT('"GDG"')"
X=OUTTRAP(OFF)
DO A = LST.0 TO 1 BY -1
IF POS('NONVSAM',LST.A) > 0 THEN DO
DSN = SUBSTR(LST.A,POS('NONVSAM',LST.A)+13,44)
A = 0
END
END
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
This code works for me:
Code: |
/* REXX */
Do Forever
"EXECIO 1 DISKR indd"
If rc <> 0 Then Leave
Parse Upper Pull dsn .
allocstr = "ALLOC DSN('"dsn"') SHR REUSE",
"RTDSN(thedsn)"
Call BPXWDYN(allocstr)
Say thedsn
allocstr = "FREE DSN('"dsn"')"
Call BPXWDYN(allocstr)
End
"EXECIO 0 DISKR indd (FINIS"
Exit 0
|
|
|
Back to top |
|
|
ayansau
New User
Joined: 22 Jun 2007 Posts: 42 Location: Chennai
|
|
|
|
Thanks EXPAT ... Its working |
|
Back to top |
|
|
|