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

Can existance of multiple(2) DSNs be checked together?


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

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Wed Apr 25, 2007 11:42 am
Reply with quote

Can existance of multiple(2) DSNs be checked using following code ?

ARG DSN
STATUS=SYSDSN("'"DSN"'")
IF STATUS='DATASET NOT FOUND' THEN SAY 'DATASET NOT FOUND'
IF STATUS='DATASET NOT FOUND' THEN EXIT 02
ELSE EXIT 0
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Apr 25, 2007 11:54 am
Reply with quote

You tell us...

did You try ?

did You check the syntax of the SYSDSN command/function
Back to top
View user's profile Send private message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Wed Apr 25, 2007 12:29 pm
Reply with quote

enrico-sorichetti,
I am quite busy @ my workplace.This work was a bit urgent.
Yes, I will try and let you know.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Apr 25, 2007 12:43 pm
Reply with quote

Hi!

I know perfectly that only one dataset name is allowed,

My reply simply suggested that for this kind of questions it is usually faster to look at the docs.

and run the snippet You typed in addition to posting it here

regards

e.s


http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj4a370/4.4.10?ACTION=MATCHES&REQUEST=sysdsn&TYPE=FUZZY&SHELF=IKJ4BK70.bks&DT=20060626210253&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Wed Apr 25, 2007 1:42 pm
Reply with quote

enrico-sorichetti,I had a look at this syntax but since I am not much conversant with REXX thaught there could be another way , that I could get from expets overhere..neway thanks for all.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Apr 25, 2007 2:18 pm
Reply with quote

It is not what You asked for,

but the ALLOCATE command takes a list of dataset;

Quote:

DATASET(dsname | *) | DSNAME(dsname | *)
specifies the name or a list of names of the data sets that are to be allocated. If a list of data set names is entered, ALLOCATE allocates and concatenates non-VSAM data sets. The data set name must include the descriptive (rightmost) qualifier and can contain a member name in parentheses.


"ALLOCATE FI(ddname) DA(dsn1 dsn2 .... dsnx ) SHR "

if You get an error then You must find out which dataset is not there
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top