Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to convert relative gdg to its absolute name

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to convert relative gdg to its absolute name
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Jan 29, 2008 4:07 pm    Post subject: Reply to: How to convert relative gdg to its avsolute name
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jan 29, 2008 5:57 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Jan 29, 2008 6:59 pm    Post subject: Reply to: How to convert relative gdg to its absolute name
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us