Mainframe Utility: COMPRSME

Return to Mainframe Utilities Page

Module


ISREDIT MACRO (HELP)
ISPEXEC CONTROL ERRORS RETURN
/**** SET MESSAGE DISPLAY ON/OFF BASED ON THE DEBUG SWITCH ***/
ISPEXEC VGET (DBGSWTCH) PROFILE
IF &DBGSWTCH = &STR(ON) THEN CONTROL MSG LIST CONLIST SYMLIST NOFLUSH
ELSE CONTROL NOMSG NOLIST NOFLUSH NOPROMPT
/********************************************************************/
/*    COMPRSME                                                      */
/*                                                                  */
/* PURPOSE:  THIS EDIT MACRO WILL COMPRESS A PDS LIBRARY WHILE      */
/*           A MEMBER IS BEING EDITED.  IF A 'SAVE' HAS BEEN        */
/*           ATTEMPTED AND A SPACE PROBLEM OCCURS, THE PDS CAN BE   */
/*           BE COMPRESSED BY ENTERING 'COMPRSME' ON THE COMMAND    */
/*           LINE.  THE IEBCOPY MESSAGES WILL BE PLACED IN A        */
/*           SYSDA DATASET NAMED '&USERID.COMPRESS.LIST' AND MAY    */
/*           BE REVIEWED.                                           */
/*                                                                  */
/*      CREATED BY JEFF JONES 12/6/89 - SEATTLE SE CENTER           */
/*                                                                  */
/*           C H A N G E        L O G                               */
/*      PROJECT     DATE        ID             COMMENTS             */
/*                                                                  */
/********************************************************************/

IF &HELP = &STR(HELP) THEN GOTO HELPSEC

  ISREDIT (EDITDSN) = DATASET
  SET &EDITDSN = &NRSTR('&EDITDSN')

ERROR +
 DO
  ERROR OFF
  WRITE AN ERROR HAS OCCURRED PRIOR TO THE COMPRESS.
  FREE FILE(SYSIN,SYSPRINT,SYSUT3,SYSUT4,OUTPUT)
  GOTO ENDIT
 END

ALLOCATE FILE(SYSIN) +
    UNIT(SYSDA) VOLUME(WRK$$$) +
    SPACE(1,1) TRACK +
    LRECL(80) RECFM(F) BLKSIZE(80) REUSE
SET LISTDSN = &STR(&SYSUID..COMPRESS.LIST)
IF &SYSDSN('&STR(&LISTDSN)') ¬= OK THEN +
 ALLOCATE FILE(SYSPRINT) DATASET('&STR(&LISTDSN)') RECFM(F,B,A) +
   UNIT(SYSDA) VOLUME(WRK$$$) +
   LRECL(121) BLKSIZE(12947) SPACE(1,1) TRACK REUSE
ELSE +
 ALLOCATE FILE(SYSPRINT) DATASET('&STR(&LISTDSN)') SHR REUSE
 ALLOCATE FILE(SYSUT3) UNIT(SYSDA) SPACE(1,1) CYLINDERS REUSE
 ALLOCATE FILE(SYSUT4) UNIT(SYSDA) SPACE(1,1) CYLINDERS REUSE
 ALLOCATE FILE(OUTPUT) DATASET(&EDITDSN) SHR REUSE

OPENFILE SYSIN OUTPUT
SET SYSIN = &STR(   COPY INDD=OUTPUT,OUTDD=OUTPUT)
PUTFILE SYSIN
CLOSFILE SYSIN

ERROR +
 DO
  WRITE COMPRESS ERROR - DETAILS IN '&STR(&LISTDSN)'
  GOTO ENDIT
 END

TSOEXEC CALL 'SYS1.LINKLIB(IEBCOPY)' 'SIZE=512K'
  WRITE &EDITDSN COMPRESSED AT &SYSTIME &SYSDATE

GOTO ENDIT

HELPSEC: +
WRITE
WRITE            *** HELP FOR EDIT MACRO 'COMPRSME' ***
WRITE
WRITE THE COMPRSME MACRO WILL ENABLE A USER WHO IS EDITING A PDS LIBRARY
WRITE TO COMPRESS THE DATASET WITHOUT EXITING THE MEMBER BEING EDITED.
WRITE
WRITE IF AN ATTEMPT HAS BEEN MADE TO SAVE A NEW PDS MAMBER AND A SPACE
WRITE PROBLEM OCCURS THE DATASET CAN BE COMPRESSED BY TYPING 'COMPRSME'
WRITE ON THE COMMAND LINE AND PRESSING 'ENTER'.  A MESSAGE STATING THAT
WRITE THE DATASET HAS BEEN COMPRESSED WILL BE DISPLAYED ON THE SCREEN
WRITE UPON SUCCESSFUL COMPLETION OF THE COMPRESS.
WRITE
WRITE THE IEBCOPY MESSAGES MAY BE REVIEWED, IF DESIRED, AFTER THE
WRITE COMPRESS IS COMPLETE BY EDITING A SYSDA DATASET NAMED
WRITE '&STR(&LISTDSN)'
WRITE
WRITE
WRITE
WRITE
WRITE       *** END OF HELP *** NO PROCESSING PERFORMED ***

EXIT
ENDIT: +
 END
            


Documentation


 This utility allows the user to type COMPRSME on the command line of an edit
 session of a PDS member and compress the PDS.  This can be quite useful when
 you go to store a new member and find out that the PDS has run out of space.
 Your IEBCOPY compress messages are then placed in a dataset under your TSO user
 id.
            


Leave a Reply

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