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

REXX Query on ISPF Service


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Aug 31, 2009 11:29 am
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: 2358
Location: Israel

PostPosted: Mon Aug 31, 2009 12:03 pm
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
Reply with quote

Great Help!!
Thank you, It worked

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

Global Moderator


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

PostPosted: Mon Aug 31, 2009 9:13 pm
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: 400
Location: Mumbai

PostPosted: Mon Aug 31, 2009 10:54 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top