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

To Find If A Member Of PDS is Empty


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vikramp

New User


Joined: 31 May 2007
Posts: 3
Location: chennai,andhrapradesh,india

PostPosted: Wed Oct 03, 2007 8:08 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 03, 2007 8:15 pm
Reply with quote

Why do not try it Yourself ? :-)

You will see that ISPF will throw a nice error message

regards

e.s
Back to top
View user's profile Send private message
vikramp

New User


Joined: 31 May 2007
Posts: 3
Location: chennai,andhrapradesh,india

PostPosted: Wed Oct 03, 2007 8:43 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 03, 2007 8:47 pm
Reply with quote

Can't you attempt to read (via EXECIO) 1 record from the member, and check whether it was successful or not?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Oct 03, 2007 8:48 pm
Reply with quote

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
View user's profile Send private message
vikramp

New User


Joined: 31 May 2007
Posts: 3
Location: chennai,andhrapradesh,india

PostPosted: Wed Oct 03, 2007 8:55 pm
Reply with quote

thanks superk & ofer71,

i could try the EXECIO command. i think it might work.

thanks a lot.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 03, 2007 9:05 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 03, 2007 9:21 pm
Reply with quote

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
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
Search our Forums:

Back to Top