Posted: Wed Jun 22, 2016 11:28 am Post subject: FM/IMS UPDATE REXX PROGRAM
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
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Jun 22, 2016 1:06 pm Post subject:
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
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
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