I have a few query about file allocation
when do you DDNAME or FILE when you allocate a dataset?
Is here any different between DA and DSN?
When you FREE a file does it same as you do an IEFB14 to delete the file?
When do you use OLD SHR and REUSE?
I have a REXX program that I created an output file and the next time I execute it then I am unable to write to the file again.
Error informing file is not allocating as duplicate file name found.
When it comes to the step to write and it will said file is not found.
In this situation, should I allocate the file with OLD REUSE or SHR REUSE
My code:
if sysdsn(REPORT) is ok then ....
else
physical allocate the file
"free FI(REPORT)"
"allocate FI(REPORT) DA('myid.XXX.report') SHR REUSE"
"execio * diskw REPORT(STEM line."
if rc = 0 then
"execio 0 diskw REPORT(FINIS'