55 pts.
 Using REXX to find word
Using a rexx, I need to find some words in a job batch and send a message for the user when found them.

Software/Hardware used:
z/os 01.13 ISPF
ASKED: October 3, 2012  9:38 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Using a rexx, I need to find some words … and send a message…
 
Why must you use REXX? Where will you look to “find some words”? How will you “send a message”? (I.e., what messaging interface will you use?) Finally, what is your problem in doing this? Do you need someone to write the whole REXX program for you?
 
Tom

 108,135 pts.

 

My rexx has the name @CHKDB2.For the message i will use the “Adress TSO” with “send” to the “user id”.For the “words i want to find” it happens like this: 1st. A job runs and call a rexx proclib (pgm=ikjeft01,parm=’@chkdb2 &member(1,8, ) 6subsys(1,8,)’ 2nd after the rexx find the forbidden words in the dd IN1 of the job will send a message to the userid.I have a very old rexx, to much complex and not adequated to this propose. is it possible give any example?

 55 pts.

 

I have a very old rexx, to much complex and not adequated to this propose.
 
Can you share it with us or show us any attempts you’ve made? If an existing proc is ‘too complex’, it might imply that there are elements that need attention that we are not aware of.
 
Tom

 108,135 pts.

 

        When some user submit a job (and this
one is a example which forbidden words are DB2A, DBSB and DB2D)…


//!JOBSISCAJCL06 JOB ,’TESTE @CHKDB2′,                       

//         MSGLEVEL=(1,1),                                   

//         MSGCLASS=X,                                       

//         CLASS=!CLASSE4,                                   

//         NOTIFY=PRDVCF                                     

//*                                                          

//LIBSRCH  JCLLIB
ORDER=!JPRCLIB                             

//*        JCLLIB
ORDER=!TESTE                               

//         INCLUDE
MEMBER=$BATCH                             

//         INCLUDE
MEMBER=$TCPIP                             

//*                                                           

//STEP01   EXEC PGM=PSUBJOB                                  

//JOBIN    DD
DISP=SHR,DSN=NDVRCER.CER.JCL.FTS01.PT(VASCO)   

//JOBOUT   DD
SYSOUT=(2,INTRDR)                              

//SYSIN    DD *                                              

#01.    DB2A                                                 

#02.    DBSB                                                 

#03.    DB2D                                                 

 

        …is calling this step in other process
(not important in this matter)…


//*************************************************************

//CHKJCL1   EXEC
PGM=IKJEFT01,                                

//            PARM=’@CHKDB2
&MEMBER(1,8, ) &SUBSYS(1,8,)’     

//SYSEXEC   DD
DISP=SHR,DSN=NDVRDES.DES.JCL.PRCLIB01.PT       

//SYSTSPRT  DD SYSOUT=*                                       

//SYSTSIN   DD DUMMY                                          

//IN1       DD
DISP=(OLD,PASS),DSN=&&ELMOUT                   

//IN2       DD
DISP=SHR,DSN=NDVRDES.DES.FILE.CNTL01.PT        

//*                                                           

 

        …and the rexx code I made.


000001
/* Rexx @CHKDB2                                                     
*/

000002                                                                        

000003
signal on syntax                         
/* trap rexx syntax errors */

000004
signal off novalue                   
/* trap unititalized variables */

000005
signal on  error      /* handle positive rc command failures
in code */

000006
signal on  failure    /* handle negative rc command failures in
code */

000007
signal on  halt                    /* allow normal hi/he
termination */

000008                                                                         

000009                                                                        

000010
Call Main_Routine                                                      

000011
Return                                  
                               

000012
Main_Routine:                                                          

000013
return_code = 0                                                        

000014
Call Valida_Input                                                      

000015
Call ini_vars                                                          

000016
Call Valida_Env                                                        

000017
Call alloc_files in1 f1                                                 

000018
say in1 & say in2                                                      

000019                                                                        

000020
Call alloc_files_pds in2 f2   

000021                                                                         

000022
“EXECIO * DISKR f2 (STEM tabclass. FINIS”                              

000023
if rc <> 0 then                                                        

000024 do                                                                      

000025   say ‘Erro na leitura do ficheiro de input:
‘f2                       

000026   return_code = 16                                                     

000027   Call exit                                                            

000028
end                                                                    

000029
if tabclass.0 = 0 then                                                 

000030 do                                                                      

000031   say ‘Ficheiro de input vazio:  ‘f2                                   

000032   return_code = 16                                                     

000033   exit 4                                                                

000034
end                                                                    

000035                                                                        

000036
mylist=”‘DB2A ‘ DB2B ‘ DB2D ‘”                                          

000037
drop (mylist) find                                                     

000038  exit                                                                                                          

 

 

My Rexx experience is in a very low level (as all you
noticed!…)

I just had a beginner course two months ago for the
first time and now I have this work to finish.

And I really want to make it.

Will you help me?

Many thanks.

 55 pts.

 

A few questions come from your REXX…

First, do you have descriptions of these procs — Valida_Input, ini_vars, Valida_Env, alloc_files and alloc_files_pds? The code you showed is useful, but it’s clearly only general control code. Without knowing what the sub-procs do, there’s no understanding of what the control code is controlling.

Second, I can see the EXECIO and the SYSIN DD data. But I don’t see how it relates to your mylist variable. The values are similar but don’t quite match, and mylist isn’t referenced anywhere except to drop it. And the tabclass stem variable is only checked to see if it has no values. Do you want to compare mylist and tabclass values?

Finally, what is the REXX supposed to be checking? Does it just need to see what values are in SYSIN? That doesn’t make much sense to me.

Tom

 108,135 pts.

 

BTW, I can’t see the last two comments in this thread using IE. I have to use FF to see it all… (though I have to use IE to enter comments with some basic formatting). — Tom

 108,135 pts.