Mainframe Utility: VCSR

Module


ISREDIT MACRO
/*  THIS EDIT MACRO WILL TAKE YOU TO FILE AID BROWSE ON VSAM DATASET */
/*  THAT EXISTS ON THE CURRENT CURSOR LINE */
/*  PUT YOUR CURSOR ON A LINE WITH A DSN= AND OFF TO FILEAID YOU GO */
ISREDIT (LPTR,CPTR) = CURSOR
ISREDIT (CLINE) = LINE &LPTR
CONTROL NOFLUSH
SET &BEGDSN = &SYSINDEX(DSN,&STR(&CLINE)) + 4
IF &BEGDSN EQ 4 THEN -
  DO
    SET ZEDLMSG = &STR(***NO DSN EXISTS ON THIS LINE***)
    ISPEXEC SETMSG MSG(ISRZ001)
    GOTO ENDTAG
  END
ELSE -
  DO
    SET &ENDDSN = &SYSINDEX(&STR(,),&STR(&CLINE),&BEGDSN)
    SET &DSN = &SUBSTR(&BEGDSN:&ENDDSN-1,&CLINE)
    SET &DMPDSN = &DSN
    SELECT
      WHEN (&SYSDSN('&DMPDSN')=&STR(UNAVAILABLE DATASET))-
      DO
         ISPEXEC SELECT CMD(AIDBRWSE '&DMPDSN') NEWAPPL(FAXE)
      END
      WHEN (&SYSDSN('&DMPDSN')=OK) -
      DO
         ISPEXEC SELECT CMD(AIDBRWSE '&DMPDSN') NEWAPPL(FAXE)
      END
      OTHERWISE -
         GOTO ERRORTAG
    END
  GOTO ENDTAG
ERRORTAG: -
    SET ZEDLMSG = &STR(***ERROR: &SYSDSN('DSN')***)
    ISPEXEC SETMSG MSG(ISRZ001)
    GOTO ENDTAG
  END
ENDTAG: -
END
            


Documentation


 VCSR - This edit macro command is similar to the ECSR command but will allow
 VSAM datasets to be browsed, as well as sequential datasets, using File-AID.
 This command transfers control to the File-AID utility with the dataset name
 already keyed into the 'Dataset Name ===>' field of the browse panel.  This
 then allows specification of additional options for the browse of the dataset.
 To return to the edit session of the JCL, hit the PF3 key the required number
 of times to exit File-AID.
            


Leave a Reply

Your email address will not be published. Required fields are marked *