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
 

 

REXX Query on ISPF Service

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

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Mon Aug 31, 2009 11:16 am    Post subject: REXX Query on ISPF Service
Reply with quote

Hi,
I am a beginner in REXX Programming.
I am dealing with REXX ISPF File Services.

Code:
/*REXX*/       
ADDRESS ISPEXEC
DS1= "HLQ1.FILE1.JCL"
"DSINFO DATASET ("DS1")"
DSDATE = ZDSCDATE
EXIT


Here the file name the REXX search for is MY LOGIN ID as the HLQ and then the File name provided
that is MYLOGINID.HLQ1.FILE1.JCL
So whenever I execute this REXX, it abends... saying the file name specified doesnot exists.
Is there any set up required so that the REXX searches for the correct filr HLQ1.FILE1.JCL instead of MYLOGINID.HLQ1.FILE1.JCL

Please advice
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Aug 31, 2009 11:29 am    Post subject: Reply to: REXX Query on ISPF Service
Reply with quote

instead of
Code:
"DSINFO DATASET ("DS1")"

use
Code:
"DSINFO DATASET ('"DS1"')"
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 31, 2009 12:03 pm    Post subject:
Reply with quote

Or ADDRESS TSO "PROFILE NOPREFIX"

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

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Mon Aug 31, 2009 12:11 pm    Post subject: REXX Query on ISPF Service
Reply with quote

Great Help!!
Thank you, It worked

Sibi
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2025
Location: Silicon Valley

PostPosted: Mon Aug 31, 2009 9:13 pm    Post subject: Reply to: REXX Query on ISPF Service
Reply with quote

Quote:
Or ADDRESS TSO "PROFILE NOPREFIX"

This change is global, throughout the TSO user's address space. And I think it persists after logoff. It might affect other programs and will affect the usage of ISPF.

So I think Enrico's suggestion of adding the quotes is a better solution.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Mon Aug 31, 2009 10:54 pm    Post subject: Reply to: REXX Query on ISPF Service
Reply with quote

This may be picky, but it is better to put the quotes around the data set name rather than in the service call. Though they are functionally the same, it is much clearer (to me, at least) to deal with the TSO naming conventions in one place (assignment) rather than in two (assignment and service calls). Otherwise, if you need to use the same name in more than one place then you will need to change all the places you use it which are errors waiting to happen. So it is better to say
Code:
DS1= "'HLQ1.FILE1.JCL'"
"DSINFO DATASET ("DS1")"
than to say
Code:
DS1= "HLQ1.FILE1.JCL"
"DSINFO DATASET ('"DS1"')"

Also, by fully qualifying the name (using single quotes), your program will work regardless of the TSO PROFILE PREFIX/NOPREFIX setting
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 Join in SQL Query vickey_dw DB2 1 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Any Recommended Timesharing service c... johnmull All Other Mainframe Topics 0 Mon Jan 02, 2017 11:39 am


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