Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

(code included) RE: Edit macro RC28 from batch-ISPF REXX Edit loo p.

326 views
Skip to first unread message

Haynes, Zac

unread,
May 22, 2001, 2:11:05 PM5/22/01
to

When I run the REXX online it works fine, when I submit it in batch
as follows I get the RC28 on the 2nd invocation of the macro.
Thanks for your help.
 
***************************************************************
JCL:  RXLEBAT4
//XY317LE4 JOB (643,001,22690,267,0002,0011,0000,2269053OIA),      
//         LANGUAGE.ENVIRONMENT,CLASS=K,MSGCLASS=H,NOTIFY=XY317    
/*JOBPARM  ROOM=S208                                               
/*ROUTE    PRINT ASYS.LOCAL                                        
//ISPFBAT1 EXEC PGM=IKJEFT01,DYNAMNBR=999,REGION=6000K             
//SYSEXEC   DD DSN=SYS1.SISPEXEC,DISP=SHR                          
//          DD DSN=SYS1.SISPCLIB.VB,DISP=SHR                       
//          DD DSN=XY317.APGMS,DISP=SHR                            
//SYSPROC   DD DSN=SYS1.SISPCLIB.VB,DISP=SHR                       
//          DD DSN=SYS1.SYSPROC,DISP=SHR                           
//*         DD DSN=XY317.APGMS,DISP=SHR                            
//ISPLLIB   DD DISP=SHR,DSN=CATO.DBRC.LINKLIB                      
//          DD DISP=SHR,DSN=SYS1.DGTLLIB                           
//          DD DISP=SHR,DSN=CATO.INFOPAC.ABS.LOADLIB               
//          DD DISP=SHR,DSN=CATO.JOBSCAN.STD.LOADLIB               
//          DD DISP=SHR,DSN=SYS1.COB2LIB                           
//ISPCLIB   DD DSN=SYS1.SISPCLIB,DISP=SHR                          
//ISPMLIB   DD DSN=SYS1.SISPMENU,DISP=SHR                          
//ISPPLIB   DD DSN=SYS1.SISPPENU,DISP=SHR                          
//ISPSLIB   DD DSN=SYS1.SISPSLIB,DISP=SHR                          
//          DD DSN=SYS1.SISPSENU,DISP=SHR                          
//ISPTLIB   DD DSN=SYS1.SISPTENU,DISP=SHR                          
//ISPPROF   DD DSN=XY317.ISPFBAT.ISPTABL2,DISP=SHR                 
//ISPTABL   DD UNIT=VIRT,DISP=(NEW,PASS,DELETE),SPACE=(CYL,(1,1)), 
//          DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)                    
//ISPLOG    DD UNIT=VIRT,DISP=(NEW,PASS,DELETE),SPACE=(CYL,(1,1)), 
//          DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)                    
//SYSTSPRT  DD SYSOUT=H                                            
//SYSUDUMP  DD SYSOUT=H                                            
//SYSTSIN   DD * DSN=XY317.APGMS(RXLEPRX4)                         
  ISPSTART  CMD(RXLEPRX4)                                          
**********************************************************************
REXX EXEC:  RXLEMAC4
/* REXX select and process/edit each proc with the sysudump ddname */
say Date(o) time() 'Language Environment Proc Update Beginning...'   
Exec=SetProcs(); trace off                                           
say Date(o) time() 'Copies complete executing ISR Edit Changes...'   
do i = 1 to words(JclProcs)                                          
   LE=word(JclProcs,i)                                               
   say '============>' date(o) time() ISRedit i of words(JclProcs)   
   address ispexec,                                                  
   "edit dataset('shr.xy317.ledump.y.prox("LE")')  Macro(RxLEmac4)"  
   end                                                               
say Date(o) time() 'Language Environment Insertions Complete.'       
exit                                                                 
SetProcs:   JclProcs= ,                                              
   YLATSOD1 YLA000D1 YLA001D0 YLA001D1 YLA003W1 YLA010D1 YLA020D1,   
   YLA020W1 YLA030D1 YLA080D1 YLA081D1 YLA082D1 YLA083D1 YLA084D1,   
   YLA085D1 YLA086D1 YLA087D1 YLA088D1 YLA089D1 YLA190M1 YLA200D1,   
   YLA200M1 YLA200W1 YLA600D1 YLA603DM YLA605Q1 YLA610D1 YLA698DM   
   RETURN ""
*************************************************************************
EDIT MACRO:  RXLEMAC4
/* rexx follow logical patterns to deterine JCL values, then insert */
trace off                                                             
address isredit                                                       
"macro (noprocess)"                                                   
"autosave on"                                                         
"stats off"                                                           
do until LeMacRc=4                                                    
   "f '//SYSUDUMP'"                                                   
   if rc=4 then do;  LeMacRc=4;  iterate;  end                        
   "(Jclline)=line .zcsr"                                             
                                                                      
   if pos('DUMMY',Jclline)>0 then iterate                             
   "(ProcName)=member";          StatStatus=On                        
                                                                      
   sys          =substr(ProcName,1,1)                                 
   sub          =substr(ProcName,3,1)                                 
   Hlq          =overlay(sys,'CAT$',4)                                
   "f ' EXEC ' prev"                                                  
   "(Jclline)=line .zcsr"                                             
   StepNameDlim =pos(' ',Jclline) - 3                                 
   Step         =substr(Jclline,3,StepNameDlim)                       
   Proc         =overlay('E',ProcName,2)                              
                                                                      
   "f '//SYSUDUMP'"                                                   
   "label .zcsr = .BGDD"                                              
   if line .zcsr = .zl then  "delete all .bgdd .bgdd"                 
   else do                                                            
     "f '//'";          "(Jclline)=line .zcsr"                        
     ddname=substr(Jclline,1,3)                                       
     if ddname \= '// ' then "delete all .bgdd .bgdd"                 
     else do until DeleteMarkers=Yes                                  
        "f '//'";          "(Jclline)=line .zcsr"                     
        ddname=substr(Jclline,1,3)                                    
        if ddname = '// ' then iterate                                
        "f '//' 1 prev"                                               
        "label .zcsr = .ENDD"                                         
        "delete all .bgdd .endd"                                      
        DeleteMarkers=Yes                                             
        end                                                           
     end                                                              
                                                                      
   "line_before .zcsr =",                                             
   "'//ABNLDUMP DD  DUMMY                                           '"
   "line_before .zcsr =",                                             
   "'//ABNLTERM DD  DSN="hlq"."proc"."step".ABNLTERM,               '"
   "line_before .zcsr =",                                             
   "'//             DISP=(,DELETE,CATLG),AVGREC=K,MGMTCLAS=MCTRAN00,'"
   "line_before .zcsr =",                                             
   "'//             SPACE=(125,(1,10),RLSE)                         '"
   "line_before .zcsr =",                                             
   "'//CEEDUMP  DD  DSN="hlq"."proc"."step".CEEDUMP,                '"
   "line_before .zcsr =",                                             
   "'//             DISP=(,DELETE,CATLG),AVGREC=K,MGMTCLAS=MCTRAN00,'"
   "line_before .zcsr =",                                             
   "'//             SPACE=(133,(1,10),RLSE)                         '"
   "line_before .zcsr =",                                             
   "'//SYSUDUMP DD  DSN="hlq"."proc"."step".SYSUDUMP,               '"
   "line_before .zcsr =",                                             
   "'//             DISP=(,DELETE,CATLG),AVGREC=K,MGMTCLAS=MCTRAN00,'"
   "line_before .zcsr =",                                             
   "'//             SPACE=(125,(1,10),RLSE)                         '"
   end                                                                
if StatStatus=On then "stats on"                                      
"builtin end"                                                         




    -----Original Message-----
    From:   Haynes, Zac
    Sent:   Tuesday, May 22, 2001 12:32 PM
    To:     'ISPF discussion list'
    Subject:        Edit macro RC28 from batch-ISPF REXX Edit loop.

    While REXX looping & editing members in a pds I get a return
    code 28 always on the 2nd edit-loop iteration.  While RTFM I
    see this must be happening after the address isredit "end"
    command in the first invocation of the macro.  The manual
    says "Command found either preceding the "Macro" command or
    following the "End" command", but this macro starts with
    "Macro" and ends with "End".  The 2nd REXX edit iteration
    gets a RC28 on the ADDRESS ISREDIT "MACRO" command.  Does
    any one have experience with this?  the same process runs
    ok online.  This problem only happens in batch.


    Zac Haynes, Systems Programmer:  714-404-8840, 888-477-8375.
    ISPF Dialog, REXX, Assembler, SAS, Endevor, DB2, SQL, Macro.

Dave Salt

unread,
May 22, 2001, 2:46:32 PM5/22/01
to
Zac,

have you tried a few well placed "SAY" and/or "TRACE" statements? For
example, you might want to SAY the "LE" member name each time through the
loop, or say the ZERRSM and ZERRLM (short and long error messages, if any)
following each "EDIT DATASET..." command, etc..

On a general note, as the list of PROC names are literals and not variables
you might want to consider putting them in quotes. Better still, assign each
PROC name to a stem variable as this will save having to parse the names
each time through the loop. Finally, as these member names are "hard-coded",
you might want to consider adding a "SYSDSN" statement to ensure each member
exists before trying to edit it. Better still, LMINIT and LMOPEN the data
set before entering the loop, then use LMMFIND each time through the loop to
ensure the member exists (much faster than SYSDSN), then use LMFREE after
you exit the loop. Hope that helps,

Dave Salt

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Stephen E. Bacher

unread,
May 22, 2001, 3:14:35 PM5/22/01
to
>When I run the REXX online it works fine, when I submit it in batch
>as follows I get the RC28 on the 2nd invocation of the macro.

REXX EXEC: RXLEMAC4


/* REXX select and process/edit each proc with the sysudump ddname */

EDIT MACRO: RXLEMAC4


/* rexx follow logical patterns to deterine JCL values, then insert */

Two different execs both named RXLEMAC4?

Is it that one is in SYSEXEC and one is in SYSPROC? Or was this just
a finger check on your part typing the headers? If not, this could be
a clue to your problem.

- seb

Muzz Bruce

unread,
May 22, 2001, 8:58:59 PM5/22/01
to
Your ReXx loops correctly, and the batch bits are probably OK, but you
dont appear to be returning corectly from the edit macro and need to
code the following in your macro:
address ISREDIT
"END"
"MEND"
exit

hope it gets you on the right track!
Muzz

ZHa...@BCBSM.COM (Haynes, Zac) wrote in message news:<7B1F66E4AE93D211B08C...@snt451.corp.bcbsm.com>...

Doug Nadel

unread,
May 22, 2001, 9:09:27 PM5/22/01
to
I haven't been following this thread, but MEND is no longer needed.
(It's been a no-op since version 2.3 of ISPF).

On 22 May 2001 17:58:59 -0700, murray...@paradise.net.nz (Muzz Bruce) wrote:

> need to code the following in your macro:
>address ISREDIT
>"END"
>"MEND"
>exit
>

Doug Nadel
----------------------------------------
ISPF and OS/390 Tools & Toys page:
http://somebody.home.mindspring.com/

Mail containing HTML or any attachments, including vcf files, is
automatically discarded. If you need to send me an attachment,
please let me know so that I can change my email filters.

0 new messages