View previous topic :: View next topic
|
Author |
Message |
vikramp
New User
Joined: 31 May 2007 Posts: 3 Location: chennai,andhrapradesh,india
|
|
|
|
Hi,
Is there is any way to find if a member of a PDS is empty through REXX.
I have a requirement in the project where i need to check if the member of PDS is empty and if some one trys to open it in browse mode, i need to throw some error message. Can anybody help me with this please....? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Why do not try it Yourself ? :-)
You will see that ISPF will throw a nice error message
regards
e.s |
|
Back to top |
|
|
vikramp
New User
Joined: 31 May 2007 Posts: 3 Location: chennai,andhrapradesh,india
|
|
|
|
no,
I need to throw a custom error message, because it throws an ispf error message it closes the screen and i don't want that. can any one tell me a way out of this pleaseeee...? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Can't you attempt to read (via EXECIO) 1 record from the member, and check whether it was successful or not? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Do you want to do it programmatically, or anytime a user enters a member? If the later, use an organizational Initial Edit Macro.
O. |
|
Back to top |
|
|
vikramp
New User
Joined: 31 May 2007 Posts: 3 Location: chennai,andhrapradesh,india
|
|
|
|
thanks superk & ofer71,
i could try the EXECIO command. i think it might work.
thanks a lot. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Also, I'm thinking, wouldn't the ISPF Services LMMLIST with STATS(YES) variable for ZLCNORC (Current number of records) (if value is zero) be useful? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
because it throws an ispf error message it closes the screen and i don't want that |
I do not answer questions without checking
I checked again and YOU ARE JUST PLAIN WRONG,
it does not close the screen
ISPF issues the message "ISRB107" and sits there waiting for YOU to press the PF1 key in order to see the long message.
if You are using a dialog
without "CONTROL ERRORS RETURN"
ISPF will display a dialog error panel with msg ISRB107
with "CONTROL ERRORS RETURN"
ISPF will do nothing and let You handle the error
in both cases the return code from
"BROWSE DATSET(your.empty.dataset)"
will be 12
regards
e.s |
|
Back to top |
|
|
|