View previous topic :: View next topic |
Author |
Message |
karavi2000 Beginner
Joined: 17 Aug 2003 Posts: 51 Topics: 26 Location: Chennai
|
Posted: Thu Jan 29, 2004 12:57 am Post subject: Reg: Browsing Dataset using ISPEXEC |
|
|
Hi,
When I was writing a REXX to browse a dataset using ISPEXEC and when I tried to browse a empty dataset, my program got abended saying "Empty PDS member or an Empty sequential data set". Is there any way we can trap that and make a normal routine EXIT instead of getting abended. I have here also the code which I used to browse the dataset.
ADDRESS ISPEXEC
"ISPEXEC BROWSE DATASET("Dataset_Name")"
Thanks & Regards,
Ravishankar |
|
Back to top |
|
 |
sriramla Beginner
Joined: 22 Feb 2003 Posts: 74 Topics: 1
|
Posted: Thu Jan 29, 2004 3:16 am Post subject: |
|
|
In the beginning of your program, use:
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
This ensures that the return code is given back to the application in the variable RC that you can interrogate for further actions. For example, after your "BROWSE DATASET" command, check RC. RC=0 means succes; RC=4 means warning etc.. Refer Manual for further details.
Hope this helps. |
|
Back to top |
|
 |
karavi2000 Beginner
Joined: 17 Aug 2003 Posts: 51 Topics: 26 Location: Chennai
|
Posted: Thu Jan 29, 2004 8:30 am Post subject: |
|
|
Hi Sriramla,
Yeah. I got that. I am able to trap the return code when adding "CONTROL ERRORS RETURN" to ISPEXEC. Thanks for your help.
With Cheers....
Thanks & Regards,
Ravishankar |
|
Back to top |
|
 |
|
|