Page 1 of 1

Creating the MSG test

PostPosted: Fri Mar 09, 2018 10:59 pm
by gshaw31
Hello,
This is my first question on this board. I am in the process of writing a Rexx application to recover our system at DR. I am wanting to write (what I assume is a edit macro) to write instuctions at the top of each member, very much like the message about "the undo command is not available". This comes into the JCL with ==MSG> on the left.
How are these msg created? I can't find any place for an example. I know that I have seen some product installs that also create text above the JCL. I want to be able to create instructions for operations. I could always just code a comment "//*" but i wanted something slicker.

Any help/direction is greatly appreciated
Garrett

Re: Creating the MSG test

PostPosted: Sat Mar 10, 2018 12:51 am
by Terry Heinze
I don't know REXX, but this is the edit macro I use to insert a JOB statement at the beginning of some JCL. Customize for your use:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
/*                                                                    */
/*  JS       -  INSERT A JOB STATEMENT AT THE BEGINNING OF THE        */
/*              DATASET BEING EDITED.                                 */
/*                                                                    */
/*  AUTHOR   -  MAINFRAME JOURNAL                                     */
/*  CREATED  -  12/07/1989                                            */
/*  CHANGED  -  06/07/2017                                            */
/*                                                                    */
ISREDIT MACRO
SET ME = &NRSTR(&&&&SYSUID)
ISREDIT LINE_AFTER  0 = "//&SYSUID.XX JOB (AAB00,9250),+
                       'XXXXX XXXXXX -- 2559',"
/* <-- CHANGE THIS PARM
ISREDIT LINE_AFTER  1 = "//             CLASS=B,"           /* JOB
ISREDIT LINE_AFTER  2 = "//             MSGCLASS=H,"        /* STATEMENT
ISREDIT LINE_AFTER  3 = "//*            RESTART=PROCNAME.SXX,"  /* AND
ISREDIT LINE_AFTER  4 = "//             NOTIFY=&ME"        /* PARAMETERS
ISREDIT LINE_AFTER  5 = "//*  I AM '&SYSUID..XXXX.JCL.PPXX(XXXXXXXX)'"
ISREDIT LINE_AFTER  6 = "//*"
ISREDIT LINE_AFTER  7 = "//*/*JOBPARM  SYSAFF=MNTA  <--- FOR ABEND-AID "
ISREDIT LINE_AFTER  8 = "//*/*JOBPARM  SYSAFF=MNTB  <--- FOR ABEND-AID "
ISREDIT LINE_AFTER  9 = "//*  COMPILE WITH XPEDITER IF YOU WANT AN     "
ISREDIT LINE_AFTER 10 = "//*  ABEND-AID REPORT.                        "
ISREDIT LINE_AFTER 11 = "//*//         JCLLIB ORDER=(XXXXXX.PROCLIB) <-"
ISREDIT LINE_AFTER 12 = "//*//JOBLIB   DD  DSN=XXXXXX.XXXX.LOD.PPXX,   "
ISREDIT LINE_AFTER 13 = "//*//             DISP=SHR                    "
ISREDIT LINE_AFTER 14 = "//*"
SET &ZEDSMSG = JOB STATEMENT INSERTED               /* FILL    SHORT MSG
SET &ZEDLMSG = A JOB STATEMENT HAS BEEN INSERTED AT THE BEGINNING +
               OF THIS DATASET                      /* FILL    LONG  MSG
ISPEXEC SETMSG MSG(ISRZ000)                         /* DISPLAY SHORT MSG
******************************** Bottom of Data ********************************

Re: Creating the MSG test

PostPosted: Sat Mar 10, 2018 2:24 pm
by willy jensen
Check the LINE_AFTER command in the ISPF Edit and Edit Macros manual

Re: Creating the MSG test

PostPosted: Sat Mar 10, 2018 5:52 pm
by prino
A totally bogus request. You cannot create messages when opening a member, unless you set up a site-wide initial macro, and that's unlikely to be something you want to carry over to a DR site, where you're way more interested in just getting TSO and ISPF to start without also having to customize them.

Re: Creating the MSG test

PostPosted: Tue Mar 13, 2018 6:47 pm
by Blackthorn
Certainly LINE_AFTER is the way to go with this, and you can specify that you want the lines to be added as message lines rather than defaulting to data lines, eg; "isredit line_after 0 = noteline".

As Prino has pointed out, you would have to give some consideration to how this macro would be invoked, but if you a are writing a Rexx application that edits the dataset, then you can just specify the MACRO parameter after your ISPEXEC EDIT statement.

Re: Creating the MSG test

PostPosted: Wed Mar 14, 2018 5:03 am
by Pedro
t you want the lines to be added as message lines rather than defaulting to data lines, eg; "isredit line_after 0 = noteline".


The poster specifically mentioned message lines, rather than noteline, it would be msgline:
"isredit line_after 0 = msgline 'some text' "

Re: Creating the MSG test

PostPosted: Wed Mar 14, 2018 4:07 pm
by Blackthorn
Pedro wrote:
t you want the lines to be added as message lines rather than defaulting to data lines, eg; "isredit line_after 0 = noteline".


The poster specifically mentioned message lines, rather than noteline, it would be msgline:
"isredit line_after 0 = msgline 'some text' "


Apologies for any confusion, I did refer to messages in my text but then put note in my example. Although from the sound of the original requirement, it seems that a NOTE would be more appropriate than a MESSAGE.