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: 10257
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: 2038
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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