Testing an emptty member



IBM's Command List programming language & Restructured Extended Executor

Testing an emptty member

Postby samb01 » Tue Mar 20, 2012 3:06 pm

hello,

how can i test an empty member without usin macro edit.

I tried this but it doesn't work...

X = SYSDSN('VSFGT.FTD.KNJ(VGTE)')
SAY 'X =' X
IF X ^= 'OK' THEN
DO
SAY 'EMPTY MEMBER'
END
EXIT



Thank's for your help.
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Testing an emptty member

 

Re: Testing an emptty member

Postby MrSpock » Tue Mar 20, 2012 4:07 pm

I'd stick with the usual method and attempt to read one record.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Testing an emptty member

Postby steve-myers » Tue Mar 20, 2012 7:58 pm

samb01 wrote:hello,

how can i test an empty member without usin macro edit.

I tried this but it doesn't work...

X = SYSDSN('VSFGT.FTD.KNJ(VGTE)')
SAY 'X =' X
IF X ^= 'OK' THEN
DO
SAY 'EMPTY MEMBER'
END
EXIT



Thank's for your help.
Your Rexx exec checks if the dataset and member in the dataset exists, but it does not determine if there is any data in the member. As MrSpock says, in order to determine if there any data in the member, your Rexx exec must actually read the member in some way.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Testing an emptty member

Postby samb01 » Tue Mar 20, 2012 8:50 pm

OK, thanks for your answer.
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post