View previous topic :: View next topic |
Author |
Message |
vicente_garcia Beginner
Joined: 16 Nov 2004 Posts: 4 Topics: 2
|
Posted: Wed Dec 01, 2004 11:05 am Post subject: fopen(): Does DDNAME not exists or file not exists |
|
|
Hello list.
In a JCL I want to use a DDNAME to read some information only if the DDNAME is present.
In a C program, how can I check if an erron in fopen() is because
- the DDNAME in not especifyed
or
- the DDNAME is especifyed but with a non existent file ?
Enumeration of funtions and variables involved will be fine. A small sample code will be perfect
Thank you all
Vicente |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Dec 01, 2004 4:31 pm Post subject: |
|
|
vicente_garcia,
You can use LE run-time option CBLQDA to turn of the dynamic allocation of file names. CBLQDA(ON) is the setting that dynallocs a (NEW,DELETE) file when an output DD name is opened but missing from the TIOT.
you can print of all of the LE run-time options in effect using "PARM=/RPTOPTS(ON)"
ie.
Code: |
STEP0100 EXEC PGM=MYPGM,PARM='/RPTOPTS(ON)'
|
If the file is not present then you will get a JCL error.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
vicente_garcia Beginner
Joined: 16 Nov 2004 Posts: 4 Topics: 2
|
Posted: Thu Dec 02, 2004 9:12 am Post subject: |
|
|
Hi Kolusu
Seems that JES checks for valid files in JCL prior it is run. So, fopen("DD:xxxxx") will return an error only if DDNAME xxxxx is not present in JCL.
Thankyou
Vicente |
|
Back to top |
|
|
|
|