Mainframe Utility: DRAWBOX

Return to Mainframe Utilities Page

Module


ISREDIT MACRO (LAB1,LAB2,COL1,COL2)
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
IF &LAB1 = HELP THEN GOTO HELPSEC
/**********************************************************************
/* EDIT MACRO : DRAWBOX                                               *
/* AUTHOR : DAVE LEIGH                                                *
/* FUNCTION : DRAW A BOX IN A FILE BEING EDITED BY SPECIFYING TWO     *
/*            LABELS AND TWO COLUMNS AS THE BOX LIMITS.               *
/**********************************************************************

IF &LAB1 =    OR &LAB2 =     OR &COL1 =     OR &COL2 =     OR +
   &SYSINDEX(&STR(.),&STR(&LAB1)) ¬= 1 OR +
   &SYSINDEX(&STR(.),&STR(&LAB2)) ¬= 1 THEN +
    DO
        SET ZEDLMSG = &STR(*** 2 LABELS AND 2 COLUMN NUMBERS MUST BE +
                           SPECIFIED ***)
        ISPEXEC SETMSG MSG(UTLZ001)
        EXIT
    END

ISREDIT CHANGE ALL P'=' '¦' &COL1 &LAB1 &LAB2
ISREDIT CHANGE ALL P'=' '¦' &COL2 &LAB1 &LAB2
ISREDIT CHANGE ALL P'=' '-' &COL1 &COL2 &LAB1 &LAB1
ISREDIT CHANGE ALL P'=' '-' &COL1 &COL2 &LAB2 &LAB2
ISREDIT CHANGE ALL P'=' '+' &COL1 &LAB1 &LAB1
ISREDIT CHANGE ALL P'=' '+' &COL2 &LAB1 &LAB1
ISREDIT CHANGE ALL P'=' '+' &COL1 &LAB2 &LAB2
ISREDIT CHANGE ALL P'=' '+' &COL2 &LAB2 &LAB2

EXIT

HELPSEC: +                                                              02480000
ISPEXEC SELECT PGM(ISPTUTOR) PARM(HELPSHEL)                             02490000
SET ZEDLMSG = &STR(*** HELP DISPLAYED FOR DRAWBOX UTILITY +             02490000
                   *** NO PROCESSING PERFORMED ***)                     02490000
ISPEXEC SETMSG MSG(UTLZ000)                                             02490000
EXIT
            


Documentation

 This utility allows the user to specify 2 edit labels and 2 data colums as
 limits and it will create a box like the following example :
 
 EDIT ---- XXXX.XXXX.XXXX -
 COMMAND ==> drawbox .a .b 2 10         <=== command example
 =>COLS ----+----1----+----2
 .a      +-------+
 000200  |       |                      <=== result example
 000300  |       |
 .b      +-------+            


Leave a Reply

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