Code: Select all
srvroutine name(Save) session(*REQUIRED)
group_map for(*INPUT) group(#Fields)
field_map for(*OUTPUT) field(#STD_CODE) parameter_name(ReturnCode)
check_for in_file(XF1143) with_key(#XBUSER #XBOBJN)
if_status is_not(*EQUALKEY)
insert fields(#Fields) to_file(XF1143) io_error(*NEXT) val_error(*NEXT)
else
update fields(#Fields) in_file(XF1143) with_key(#XBUSER #XBOBJN) io_error(*NEXT) val_error(*NEXT)
endif
if_status is(*OKAY)
#STD_CODE := "OK"
else
#STD_CODE := "ER"
endif
endroutine
This is an imported table from the IBM i and looks like this. Where the attributes are There is no other job/user running to change the record, and the @@UPID still has 1
Code: Select all
XBUSER XBOBJN XBAUTF XBULU XBDLU XBTLU @@UPID @@RRNO
JRYOUNG TEST N JRYOUNG 20180809 100500 1 1
EDIT
Tried on another imported table using the generated templates and got the exact same error. Tried on a LANSA table (PSLMST) and it worked.
Can someone that has IBM i imported tables run the web app templates and try an update?