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

How to convert relative gdg to its absolute name


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ayansau

New User


Joined: 22 Jun 2007
Posts: 42
Location: Chennai

PostPosted: Tue Jan 29, 2008 3:56 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jan 29, 2008 4:07 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jan 29, 2008 5:57 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jan 29, 2008 6:59 pm
Reply with quote

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
View user's profile Send private message
ayansau

New User


Joined: 22 Jun 2007
Posts: 42
Location: Chennai

PostPosted: Wed Jan 30, 2008 11:37 am
Reply with quote

Thanks EXPAT ... Its working
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top