Page 1 of 1

Testing an emptty member

PostPosted: Tue Mar 20, 2012 3:06 pm
by samb01
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.

Re: Testing an emptty member

PostPosted: Tue Mar 20, 2012 4:07 pm
by MrSpock
I'd stick with the usual method and attempt to read one record.

Re: Testing an emptty member

PostPosted: Tue Mar 20, 2012 7:58 pm
by steve-myers
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.

Re: Testing an emptty member

PostPosted: Tue Mar 20, 2012 8:50 pm
by samb01
OK, thanks for your answer.