/* rexx */ /*-------------------------------------------------------------------*/ /* */ /* REXX Exec : COPYTO */ /* */ /* ***** Edit Macro ***** */ /* */ /* Description : Copy current member to a different dataset. This */ /* can be very useful as it copies the member as it */ /* was immediately following the last save (or as it */ /* was before you started to edit). */ /* */ /* Created on : 10 Oct 2001 */ /* Created by : Kevin Ferguson */ /* : Userid MIT001 */ /* : using ABBYDALE.PROD.EMACS(COPYTO) */ /* */ /* Called by : */ /* */ /* Calls : checkdsn */ /* */ /* Panels Used : None */ /* */ /* Change Activity : */ /* */ /* ©Copyright of Abbydale Systems LLC. */ /* */ /*-------------------------------------------------------------------*/ ARG test ADDRESS ISREDIT "MACRO (test) PROCESS" ADDRESS ISREDIT "(DSNAME) = DATASET" ADDRESS ISREDIT "(MEMBER) = MEMBER" ADDRESS ISREDIT '(LASTLINE) = LINENUM .ZLAST' dsn = "" if test = "" then do do while dsn = "" Say 'Where to? (use QUIT or END to terminate)' parse upper pull dsn if dsn = 'QUIT' then exit if dsn = 'END' then exit checkdsn dsn if rc <> 0 then do if rc = 12 then do say "the dataset must already exist" end dsn = "" end end end else do do while dsn = "" checkdsn test if rc = 0 then do dsn = test end else do if rc = 12 then do say "the dataset must already exist" end Say 'Where to? (use QUIT or END to terminate)' parse upper pull test if test = 'QUIT' then exit if test = 'END' then exit end end end "ALLOC F(ASLIN01) DATASET('"dsname"("member")') shr reus" "EXECIO * DISKR ASLIN01 (STEM LINE. FINIS" "FREE F(ASLIN01)" "ALLOC F(ASLOUT1) DATASET('"dsn"("member")') shr reus" "EXECIO * DISKW ASLOUT1 (STEM LINE. FINIS" "FREE F(ASLOUT1)" ZEDSMSG = "Copied" ZEDLMSG = "Member "member "copied to "newname ZDLMSG = "Member copied" Address ISPEXEC "VPUT (ZDLMSG ZDLMSG) SHARED" address ISPEXEC "SETMSG MSG(ISRZ001)" exit /*-------------------------------------------------------------------*/ /* End of COPYTO */ /*-------------------------------------------------------------------*/