MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FM/IMS UPDATE REXX PROGRAM

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Wed Jun 22, 2016 11:28 am    Post subject: FM/IMS UPDATE REXX PROGRAM Reply with quote

Hi I have written a job using filemanager ims and rexx.
Ress code to read the file is
Code:

/* Read the key file */                                     
   address MVS 'EXECIO * DISKR INFILE (STEM INFILE. FINIS'   
   if rc <>= 0 | infile.0 = 0 then do                         
      say 'No key provided'                                 
      signal exit                 


The data in input file is
Code:

----+----1----+----2----+----3----+----4-
***************************** Top of Data
00000000000004000324 0014 BILLING      I

I am parsing the values in input file as below

Code:
/* Process keys in the file */               
   do i = 1 to infile.0                     
      parse var infile.i,                   
             1 PENDING-CONTROL-KEY-I 21,     
            22 VIEW-SEQUENCE-I 26,           
            27 REQUIREMENT-NAME-I 39,       
            40 REQMNT-PROCESS-STATUS-I 41 . 
      call main_process                     
      end                                   

But I am getting the below error message
FMNBB060 REXX procedure statements processed by REXX.
IBM File Manager for z/OS IMS Component
3 segments to process
18 +++ parse var infile.i,1 PENDING-CONTROL-KEY-I,22 VIEW-SEQUENCE-I,27 REQ
IRX0038I Error running FMNINTEX, line 18: Invalid template or pattern
FMNBB382 REXX exec terminated with RC 20038
FMNIB426 Function terminated

please help to resolve this.

Thanks
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Jun 22, 2016 1:06 pm    Post subject: Reply with quote

tvssv,

Couple of errors in your post.

1. You need to allocate the file to a DD to able to read it
2. You canNOT have hyphen "-" in variable names. so either remove it or change it to underscore.
3. Your PARSE syntax is wrong for positional parsing.

4. Try running your rexx exec with TRACE so that you know what is happening.

try this exec
Code:

/* REXX                                                    */   
/* READ THE KEY FILE                                       */   

TRACE 'I'                                                       
INFILE = 'your input key file'                                   
"ALLOC F(IMSIN) DS('"INFILE"') SHR REUSE"                       
"EXECIO * DISKR IMSIN (FINIS STEM IN."                           
   IF RC <> 0 | INFILE.0 = 0 THEN                               
      DO                                                         
        SAY 'NO KEY PROVIDED'                                   
        SIGNAL EXIT                                             
      END                                                       
   ELSE                                                         
   /* PROCESS KEYS IN THE FILE */                               
      DO I = 1 TO IN.0                                           
         PARSE VAR IN.I,                                         
         PENDIN_GONTROL_KEY_I 22,                               
         VIEW_SEQUENCE_I 27,                                     
         REQUIREMENT_NAME_I 40,                                 
         REQMNT_PROCESS_STATUS_I 41                             
         call main_process             
      END                                                       
"FREE F(IMSIN)"                                                 
EXIT 0

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Fri Jun 24, 2016 4:16 am    Post subject: Reply with quote

Hi Kolusu,

Thank You.

Hypen in variable names is the problem. I have allocated file in DD statement. And now it is working fine.
Part of cards in jcl are
Code:

0032 //TDDIN     DD DSN=PEW3D.MMM.FMIMS,               
0033 //             DISP=(SHR,KEEP,KEEP)               
0034 //INFILE    DD DSN=TEW3D.MMMAT.KEYLIST.TEST,       
0035 //             DISP=(SHR,KEEP,KEEP)               
0036 //WPCNPC00  DD DSN=UEW3D.WPCJXT.HOIRPC00,DISP=SHR 
0037 //WPCNPCA0  DD DSN=UEW3D.WPCJXT.HOIRPCA0,DISP=SHR 


and the actual code is

Code:

do i = 1 to infile.0                     
   parse var infile.i,                   
          1 PENDING_CONTROL_KEY_I 21,   
         22 VIEW_SEQUENCE_I 26,         
         27 REQUIREMENT_NAME_I 39,       
         40 REQ_PROC_ST_I 41 .           
   call main_process                     
   end                                   


Now working fine.

Thank you.
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group