On Thu, 28 Mar 2013 08:49:22 +0000, Terry Sambrooks <[email protected]> wrote:
>Hi Graham, > >Taking your questions in order: > >1 - Deleting a data set > >PARA1: > F1 = '"ENCORE.CBL.SOURCE"' > "DELETE "'F1'"" /* TRYING TO GET MY HEAD AROUND THESE QUOTE'Y THINGS */ > RC_REASON = 'DELETE 'F1; CALL RETCODE > RETURN > >This code, using the TSO DELETE command will do the job without the need to. >pre-allocate. > >The double quotes are there to ensure that the REXX interpreter does not >attempt to execute the DELETE command. The single quotes are there to >inhibit TSO prefix, which if turned on would prefix the data set name in >variable F1 with the prefix held in the TSO PROFILE. True, but the quote usage is incorrect, I believe. After F1 = '"ENCORE.CBL.SOURCE"' /* single quotes on outside, double quotes on the inside */ the variable F1 contains (including the double quotes) "ENCORE.CBL.SOURCE" which is not a correct dsname. The line should have been F1 = "'ENCORE.CBL.SOURCE'" /* double quote on the outside, single quote on the inside */ which would result in F1 containing 'ENCORE.CBL.SOURCE' instead. The DELETE line would then be: "DELETE " F1 There are other formulations that would also work, but not the one showed by Graham, as far as I know. And I think this version is simpler than many of the rest. -- Walt ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
