Re: I-SQL v4.11 - PERFORM
Posted in 1996
Well, it can be done in ISQL, but not easily. There are two possibilities, one using the standard Perform, one using a custom version. The custom version will definitely work, but the standard might not. Assuming the field tags in the form are fa, fb, fc, fd. Standard Runner: You'd need an INSTRUCTIONS section which looks something like: AFTER EDITADD, EDITUPDATE OF fa LET fb = fa[1,4] LET fc = fa[5,6] LET fd = fa[7,10] AFTER EDITADD, EDITUPDATE OF fb, fc, fd LET fa = fb + fc + fd Custom Runner: You'd need an INSTRUCTIONS section which included: AFTER EDITADD, EDITUPDATE OF fa CALL fixup_fields1() AFTER EDITADD, EDITUPDATE OF fb, fc, fd CALL fixup_fields2() The custom-runner would contain the functions fixup_fields1() which would use pf_getval() and pf_putval() to replicate the logic in the standard runner version for fa, and fixup_fields2 which would replicate the logic in fb, fc, fd. Given that you are using 4.11, you should have an ISQL 4.10 Supplement which contains the details of how to use pf_putval() etc. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >From: dgpoole@awod.com (Don Poole) >Subject: I-SQL v4.11 - PERFORM >Date: 31 Mar 1996 16:11:50 GMT >X-Informix-List-Id: <news.22659> > >Can anyone solve this problem? >A technical support said that this structure will work with Informix >4GL but *not* Informix-SQL (version 4.11). >I have to use I-SQL because there is no 4GL package at the >Unix-based server. I have come up that either fielda or fieldb,c,d >will work but still both of fielda, fieldb,c,d are needed to be stored in >the table tablea. > >SCHEMA: >tablea.fielda char(10) >tablea.fieldb char(4) >tablea.fieldc integer >tablea.fieldd integer > >PERFORM: >screenfielda [AAAAAAAAAA] >screenfieldb [ANNN] screenfieldc [NN] screenfieldd [NNNN] > >When a person adds/removes/updates a value at screenfielda, >then PERFORM takes the entered (alphanumeric) value of >screenfielda and split it into three values and converts/put them >into screenfieldb (alphanumeric) ,screenfieldc (integer), >screenfieldd (integer) into the table tablea before/after striking >the ESCAPE key. > >Thanks in advance! >Don Poole