View previous topic :: View next topic
|
Author |
Message |
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You tell us...
did You try ?
did You check the syntax of the SYSDSN command/function |
|
Back to top |
|
|
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
|