Here's my copy of the ONLY Rexx EXEC...

Thanks,
George Rodriguez
Specialist, Systems Programmer
Network & Technical Services
(561) 357-7652 (office)
(561) 707-3496 (mobil)
School District of Palm Beach County
3348 Forest Hill Blvd.
Room B-332
West Palm Beach, FL. 33406-5869
Florida's Only A-Rated Urban District For Five Consecutive Years


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Klein, Kenneth
Sent: Thursday, June 25, 2009 8:07 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: JCT Not Available

Not on my 1.9 system. I have to type out "x all;find 'failed' all;del
all x"  and cancel or I mess up the member. 
Anybody know which cbt file that edit macro is on? 


Ken Klein
Sr. Systems Programmer
Kentucky Farm Bureau Insurance - Louisville
kenneth.kl...@kyfb.com
502-495-5000 x7011

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Barbara Nitz
Sent: Thursday, June 25, 2009 7:56 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: JCT Not Available

>'only failed' as an edit command? Where did you get this "only"
command?
>CBT? 

Badly written on my part. it should have been "only 'failed'", and as
far as I know, this is a normal ISPF command. 

Barbara

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


----------------------------------------- Under Florida law, e-mail
addresses are public records. If you do not want your e-mail
address released in response to a public records request, do not
send electronic mail to this entity. Instead, contact this office
by phone or in writing.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
/* REXX */ ADDRESS ISPEXEC
/*********************************************************************/
/* The ONLY macro is a combination of EXCLUDE and FIND such that     */
/* "only" the lines containing the search string will be displayed.  */
/* The parameters for ONLY are the same as those for the FIND        */
/* command with the exception of FIRST, LAST, NEXT, and PREV.        */
/*********************************************************************/
Trace

'ISREDIT MACRO (FNDPARM)'
'CONTROL ERRORS RETURN'              /* Clist handles ISPF and PDF
                                        return codes greater than 12 */
'ISREDIT (RECFM) = RECFM'            /* Request record format        */
'ISREDIT (NUMMODE,NUMTYPE) = NUMBER' /* Request number mode info     */

Parse Var numtype std cobol display  /* NUMBER returns a string of 3
                                        words for the second value.  We
                                        need to parse NUMTYPE into its
                                        3 parts.                     */
If nummode = 'ON' Then
  Do
  /************************************************************/
  /* Number mode on can cause a mismatch between col numbers  */
  /* known to the user and to this macro if there are         */
  /* sequence numbers at the beginning of the line.  To avoid */
  /* the confusion number mode is turned off while the macro  */
  /* runs. Doing this can cause the bounds to change to       */
  /* include the line numbers if the bounds were originally   */
  /* set to the default. Therefore if they change the macro   */
  /* must override that change to prevent the search from     */
  /* including the line numbers.                              */
  /************************************************************/
    If recfm = 'V' | cobol = 'COBOL' Then
      Do                             /* These types have seq numbers at
                                        the beginning of the record. */
        'ISREDIT (LEFTON,RIGHTON) = BOUNDS' /* Note the current bounds
                                                                     */
        'ISREDIT NUMBER OFF'         /* Set number mode off.  This may
                                        cause the left bound to move.*/
        'ISREDIT (LEFTOFF,RIGHTOFF) = BOUNDS' /* Note where the bounds
                                        are now                      */
        If leftoff = 1 Then
          Do                         /* Number mode would not have
                                        allowed a left bound within the
                                        seq num, therefore a value of 1
                                        means it was changed by the
                                        NUMBER OFF, indicating default
                                        bounds                       */
            lefton = ' '             /* Blank the values to be       */
            righton = ' '            /* restored to cause defaults   */
                                     /* to be restored               */
            If recfm = 'V' Then
              'ISREDIT BOUNDS = 9 *' /* Override the left bound to
                                        exclude the seq number       */
            Else                     /* RECFM = F, therefore must be */
              Do                        cobol line numbers           */
                If std='STD' Then
                  Do                 /* Cobol may have sequence numbers
                                        at the end in addition to the
                                        beginning                    */
                    'ISREDIT (LRECL) = LRECL' /* Right bound depends on
                                        record length                */
                    'ISREDIT BOUNDS = 7' lrecl-8 /* Override both bounds */
                  End
                Else
                  'ISREDIT BOUNDS = 7 *' /* For NOSTD override only the
                                        left                         */
              End
          End
      End
  End

If substr(fndparm,1,1) ¬= "'" &,
   substr(fndparm,1,1) ¬= '"' Then   /* Not already a quoted string  */
  If pos("'",fndparm) ¬= 0 Then      /* Single quote in parm string  */
    fndparm = '"'fndparm'"'          /* Put find string in double
                                        quotes                       */
  Else                               /* No single quotes found       */
    fndparm = "'"fndparm"'"          /* Put find string in single
                                        quotes                       */

'ISREDIT SEEK' fndparm 'FIRST'       /* First see if there is a string
                                                                     */
If rc = 0 Then
  Do                                 /* If so, exclude all lines     */
    'ISREDIT EXCLUDE ALL'
    'ISREDIT FIND' fndparm 'ALL'     /* Show only lines with the string
                                                                     */
    onlyrc = 0                       /* Indicate success             */
  End
Else                                 /* If not, say so               */
  Do
    zedsmsg = 'String not found'
    zedlmsg = '"'fndparm'" not found in the entire file'
    'SETMSG MSG(ISRZ001)'            /* Set message with alarm       */
    onlyrc = 12                      /* Cause the cmd to remain on   */
  End                                /* the PDF edit command line    */

If nummode = 'ON' & (recfm = 'V' | cobol = 'COBOL') Then
  Do                                 /* If number was turned off     */
    'ISREDIT NUMBER = ('nummode','numtype')' /* Turn it back on and  */
    'ISREDIT BOUNDS =' lefton righton /* Restore the bounds          */
  End
Exit onlyrc


Reply via email to