Creating the MSG test



IBM's Command List programming language & Restructured Extended Executor

Creating the MSG test

Postby gshaw31 » Fri Mar 09, 2018 10:59 pm

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
gshaw31
 
Posts: 2
Joined: Mon Mar 18, 2013 11:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Creating the MSG test

 

Re: Creating the MSG test

Postby Terry Heinze » Sat Mar 10, 2018 12:51 am

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 ********************************
.... Terry
Terry Heinze
 
Posts: 199
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: Creating the MSG test

Postby willy jensen » Sat Mar 10, 2018 2:24 pm

Check the LINE_AFTER command in the ISPF Edit and Edit Macros manual
willy jensen
 
Posts: 162
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 23 times

Re: Creating the MSG test

Postby prino » Sat Mar 10, 2018 5:52 pm

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.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 555
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 24 times

Re: Creating the MSG test

Postby Blackthorn » Tue Mar 13, 2018 6:47 pm

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.
Blackthorn
 
Posts: 105
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Creating the MSG test

Postby Pedro » Wed Mar 14, 2018 5:03 am

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' "
Pedro Vera
User avatar
Pedro
 
Posts: 580
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 41 times

Re: Creating the MSG test

Postby Blackthorn » Wed Mar 14, 2018 4:07 pm

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.
Blackthorn
 
Posts: 105
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 4 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post