The determination would be made by the user. How do you determine what dsn to use?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Bob Bridges <[email protected]> Sent: Tuesday, March 31, 2020 5:45 PM To: [email protected] Subject: Edit macros vs TSO (was PARM= vs PARMDD= and symbol substitution) Where would the determination be made, and how would it be sure which is intended? Some of my execs are intended be run as Edit macros and some in address TSO, but some can run either way and behave differently depending on how they were called; I wouldn't want TSO to override my choice in such a case. For instance, I have a routine that lists an ID in the security system (RACF, ACF2 or TSS). At a TSS installation the command is TLIST; if the operator enters the command "tso tlist myacid", the command operates as a TSO command and displays the listed ACID. But if the operator says just "tlist", the exec tries to pick out the ACID from the current listing and list that. So in my Edit-macro skeleton I have two paragraphs I can copy into a new program. Take your pick: /* Make sure we were called as an Edit macro. */ address ISREDIT address ISPEXEC 'CONTROL ERRORS RETURN' 'MACRO (ARGS)' if rc>16 then call abend 'Edit macro!',"I run as an Edit macro, not", 'a TSO command. Issue the' self 'command again only without the', '"TSO" prefix.' address ISPEXEC 'CONTROL ERRORS CANCEL' /* Find out whether we were called as a macro or TSO command */ address ISPEXEC 'CONTROL ERRORS RETURN' address ISREDIT 'MACRO (ARGS)' fmac=(rc<20) address ISPEXEC 'CONTROL ERRORS CANCEL' if fmac then address ISREDIT else arg args "Too often you find yourself coding..." repetitive stuff? Gil, as much as you write, you don't have a skeleton member with lots of oft-used code in it? Sure, you do. --- Bob Bridges, [email protected], cell 336 382-7313 /* There is no harm in being sometimes wrong — especially if one is promptly found out. -John Maynard Keynes, Essays in Biography (1933) */ -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Tuesday, March 31, 2020 14:15 ....Why, why do macros start with TSO rather than the more useful ISREDIT? Too often I find myself coding: ADDRESS ISREDIT TRACE OFF MACRO (PARM) IF RC<>0 then PARSE ARG PARM ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
