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

how to obtain DSN when DD is known


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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon May 07, 2007 5:26 pm
Reply with quote

A REXX program runs from a JCL:
Code:
//FILEIN   DD  DISP=SHR,DSN=HLQ.SPF.COBOL(INPPROG) 
//FILEOUT  DD  DISP=SHR,DSN=HLQ.SPF.TEMP(OUTPROG)   
//SYSTSIN  DD  *
ISPSTART CMD(MYREXX)
/*

The REXX program need to get the name associated to the FILEIN DD (in that case "HLQ.SPF.COBOL(INPPROG)").
Is there a way to do that ?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon May 07, 2007 5:27 pm
Reply with quote

LISTDSI with the FILE option.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon May 07, 2007 6:39 pm
Reply with quote

Or DSINFO.

O.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon May 07, 2007 8:11 pm
Reply with quote

DSINFO seems to need the DSN as parameter.
LISTDSI is close enough and gives me the dataset name but not the member name.

I will use the "LISTALC STATUS" command. Scanning the result is a bit heavier than I wanted but it answers my needs.

Thx guys
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon May 07, 2007 11:31 pm
Reply with quote

My mistke. I meant that you can use LMINIT with DDNAME to initiate a data id, then use it in LMQUERY to get the dataset name.

O.
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 obtain VTOC information via R... CLIST & REXX 10
No new posts GETMAIN / FREEMAIN versus STORAGE OBT... PL/I & Assembler 8
No new posts How to obtain bind statistics for a p... DB2 8
No new posts EXECIO error. Unable to obtain storage. CLIST & REXX 4
No new posts Obtain date a table was loaded with a... DB2 1
Search our Forums:

Back to Top