Page 1 of 1

Test a dataset

PostPosted: Mon Sep 12, 2011 1:15 pm
by samb01
Hello,

i need to test if a dataset is allocated in DISP=OLD and after i need to test if this dataset is empty or not ==> But i don't know how can i do.
(Because i want to edit and change a liste of 100 datasets.)

Thanks for you help.

Re: Test a dataset

PostPosted: Mon Sep 12, 2011 1:46 pm
by enrico-sorichetti
the question is clear as mud
OK for issue (2)

trying my psychic powers on (1)
are You trying to determine if somebody in the GRS ring has the dataset allocated with disp old ???

rethink and repost

P.S.
investigate the use of ISPF service QUERYENQ
as described here
http://publibz.boulder.ibm.com/cgi-bin/ ... 11402#3.62

http://publibz.boulder.ibm.com/cgi-bin/ ... T#FIRSTHIT

not the latest one but more than enough for Your needs

Re: Test a dataset

PostPosted: Mon Sep 12, 2011 11:44 pm
by dick scherrer
Hello,

Why does someone believe there should be a test if a dataset has been allocated with "disp=old" at the time? Why test if the file is empty? If the file is empty, it will raise the "at end" condition on the first read. And processes should successfullt handle an "empty file" condition - not require some pre-process to determine if the fioe is actually empty. . .

Because i want to edit and change a liste of 100 datasets.
I have no idea what this tells us.

You need to start over and clearly re-post what you are trying to do. . .