Test a dataset

IBM's Command List programming language & Restructured Extended Executor

Test a dataset

Postby samb01 » Mon Sep 12, 2011 1:15 pm


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.
Posts: 221
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Test a dataset


Re: Test a dataset

Postby enrico-sorichetti » Mon Sep 12, 2011 1:46 pm

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

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
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
Global moderator
Posts: 2494
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 119 times

Re: Test a dataset

Postby dick scherrer » Mon Sep 12, 2011 11:44 pm


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. . .
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Return to CLIST & REXX


  • Related topics
    Last post