Mainframe Utility: $PRINTIT

Return to Mainframe Utilities Page

Module


PROC 1 DATASET_NAME_TO_PRINT DEBUG HELP BATCH B
/**********************************************************************
/* CLIST: $PRINTIT                                                    *
/* AUTHOR: DAVID LEIGH                                                *
/* FUNCTION: THIS CLIST IS DESIGNED SPECIFICALLY TO BE USED WITH A    *
/*           "DSLIST" (ISPF 3.4-TYPE) SCREEN.  IT MAY BE USED         *
/*           OTHERWISE AS WELL THOUGH.  IT PASSES THE DATASET NAME TO *
/*           THE "PRINTIT" CLIST FOR PROCESSING.                      *
/**********************************************************************

/**********************************************************************
/* STRIP OFF SINGLE QUOTES IF PRESENT.                                *
/**********************************************************************
SET X = &LENGTH(&STR(&DATASET_NAME_TO_PRINT))
IF &SYSINDEX(&STR('),&STR(&DATASET_NAME_TO_PRINT)) = 1 AND +
   &SUBSTR(&X:&X,&STR(&DATASET_NAME_TO_PRINT)) = &STR(') THEN +
    SET DATASET_NAME_TO_PRINT = &SUBSTR(2:&X-1,+
                                &STR(&DATASET_NAME_TO_PRINT)

/**********************************************************************
/* CALL THE PRINTIT CLIST.                                            *
/**********************************************************************
IF &B = B THEN SET BATCH = BATCH
%PRINTIT PDSN(&DATASET_NAME_TO_PRINT) &DEBUG &HELP &BATCH
EXIT
            


Documentation


 $PRINTIT simply calls the PRINTIT utility and passes a dataset name with it.
 $PRINTIT requires a dataset name as a positional parameter when you invoke it.

 $PRINTIT (like all the other utilities which begin "$") has been designed to
 work particularly well in an ISPF DSLIST screen such as ispf option 3.4.  You
 can type $PRINTIT next to one of the dataset names in the list and that dataset
 name is passed to the PRINTIT utility and you are taken into the PRINTIT
 utility selection screen.  When you exit the PRINTIT utility, you will be back
 on the dslist screen.  You can place $PRINTIT next to more than one dataset on
 the list and each will be processed without interruption.

 "$P" exists as an alias of $PRINTIT and can be used in anyway $PRINTIT can.
 For more information, see the PRINTIT utility information.
            


Leave a Reply

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