Page 1 of 1

ISRTIMS Problem

Posted: Wed Jul 30, 2014 9:15 pm
by gmosley
FM/IMS V10R1
IEB option (BMP) with Rexx
The following command produces incorrect result:

Code: Select all

FILERC = VIEWIMS('TPLDSN=DBA2.RP.TEMPLATE')
FMRC = ISRTIMS('SEGMENT=ZPODRIVP',                       
               'SET #DRIVER_LICENCE_NUM=5468864',        
               '    #MARITAL_STATUS=S',                  
               '    #PRINCPL_DRIVER_LICENCE_NUM=5468864',
               '    #VEH_PRNCPL_OPR_NME=NORTHWOOD',      
               '    #PODL_EFF_DTE=16695',                
               'WHERE SEGMENT=ZPOBASEP #POLYNUM=DCV145F')
1st and 3rd fields are packed, 4 bytes each.
2nd and 4th fields are character (AN), 1 byte and 27 bytes respectively.
5th field is 2 bytes binary.
The resulting segment, which is inserted properly, contains zeros in fields 1 and 3, blanks in fileds 2 and 4 and the correct value in field 5.
Presentation here is with values as constants, for clarity. I've tried using variables, with and without surrounding quotes. Result is always the same. Only the binary field is set properly.
Any suggestions?

Re: ISRTIMS Problem

Posted: Wed Jul 30, 2014 10:56 pm
by Anuj Dhawan
Hi gmosley and welcome to the Forums,

Please check this link -- you're using field_name in your ISRTIMS CALL. With that there are some things to be followed, specially the point 1 below -- check if you've followed that:
  1. To use field_ref or field_name, you must have already loaded a view by preceding this function call with a call to VIEWIMS.
  2. Specification of a field_ref without qualification of a layout_ref results in the field_ref being associated with the first layout for the inssegm segment if specified on the SET clause, or the segname segment if specified on the WHERE clause.
  3. To fully qualify a field_name, the layout name must be the first qualifier specified. If the layout name is not specified, FM/IMS searches all the layouts for the segment in relative order until the group qualifiers and field_name are found. If not found, an error message is displayed and processing terminates.

Re: ISRTIMS Problem

Posted: Wed Jul 30, 2014 11:32 pm
by gmosley
Thanks, Anuj.
The Field_names are resolved from the templates identified in the VIEWIMS command.
I've just managed to resolve this problem. Our tech group has a version of the FM/IMS libraries with fixes applied that haven't been rolled out to Prod (apparently they created another problem). However, for my case, using the "fix" libraries, the ISRTIMS operation works exactly as coded.
I also discovered that we're 3 releases behind (V10 vs V13). Apparently, V13 is planned for 3Q this year. Hopefully, all this will be resolved in V13.
Thanks, again.
George

Re: ISRTIMS Problem

Posted: Wed Jul 30, 2014 11:54 pm
by Anuj Dhawan
Thanks for posting what has worked for you, George. This will help later someone for sure, appreciate your gesture.

And good luck for 3Q! :)