View previous topic :: View next topic
|
Author |
Message |
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
instead of
Code: |
"DSINFO DATASET ("DS1")" |
use
Code: |
"DSINFO DATASET ('"DS1"')" |
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Or ADDRESS TSO "PROFILE NOPREFIX"
O. |
|
Back to top |
|
|
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
Great Help!!
Thank you, It worked
Sibi |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
|