I’ve two questions about DEFINEing WORK FILEs.
I saw a program without a DEFINE WORK FILE statement to a special file. Instead of it there is a CLOSE WORK FILE statement.
The accurate coding is:
DEFINE WORK FILE 2 ‘TESTFILE’
CLOSE WORK FILE 1
Next to the CLOSE WORK FILE is a statement which says: “To assure that a empty file is generated”
1.q - HOW is it possible that Natural know, which FILE in the affected JCL is to be closed??? Because in the job JCL there are two DD defined.
*) first is the ‘TESTFILE’ DD
*) second is the ‘TRASH’ DD
So you see, the ‘TRASH’ DD isn’t the first WORK FILE what is defined.
2.q - IS the use of a work file possible without a DEFINE statement?
Can anybody give me an answer??
Steve aka ‘Nax’
p.s.: Please forgive if my english isn’t very well. I am still learning