Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to obtain DSN when DD is known

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1250
Location: Israel

PostPosted: Mon May 07, 2007 5:26 pm    Post subject: how to obtain DSN when DD is known
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

Moderator Team Head


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

PostPosted: Mon May 07, 2007 5:27 pm    Post subject: Re: how to obtain DSN when DD is known
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: 2360
Location: Israel

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

Or DSINFO.

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1250
Location: Israel

PostPosted: Mon May 07, 2007 8:11 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Mon May 07, 2007 11:31 pm    Post subject:
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    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 GETMAIN / FREEMAIN versus STORAGE OBT... steve-myers PL/I & Assembler 8 Wed Feb 01, 2017 1:45 am
No new posts How to obtain bind statistics for a p... Balaji Canabady DB2 8 Fri Jun 15, 2012 3:39 pm
No new posts EXECIO error. Unable to obtain storage. scorp_rahul23 CLIST & REXX 4 Tue Mar 06, 2012 10:17 am
No new posts Obtain date a table was loaded with a... madmartinsonxx DB2 1 Thu May 19, 2011 11:48 pm
No new posts ** ASMA057E Undefined operation code ... sam_ok PL/I & Assembler 11 Thu Oct 21, 2010 3:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us