895 pts.
 DB2
i have display file which inputs a varibale say Var1....

This is updated in a PF. My problem is program is not updating this varibale in this file. it updates all other varibales...i checked the library list and evrythng is in place...

in PF, the field name is Var1. i use the same name for DSPF - Var1...

so in the program i dont have move statement..i simply update the file...cud this be the reason???



Software/Hardware used:
AS400 - RPG
ASKED: September 9, 2009  2:27 PM
UPDATED: September 11, 2009  7:52 PM

Answer Wiki:
What order are you issuing EXFMT CHAIN or READ UPDATE ? Phil ---------------------- yes.. exactly… .. what? Performs an update .. with a native I/O UPDATE command? F-spec doesn't have a prefix keyword You are saying that in debug you do an EVAL var1 just before the udpate and it's good What happens if you do EVAL var1 just after the update? Phil ---------- Are you updating the physical file or through a logical file? Phil ------------------------------ with native I/O UPDATE command? No prefix on the F-Spec No rename of fields It's been compiled over the PF with the field order of events chain/read exfmt dspfrecord update record Phil ---------------- "What happens if you do EVAL var1 just after the update? - it looks good too." Then it cannot be recognizing the var1 as a part of the record that is updated. Phil ------------------------- F-spec 'E'xternally defined?? or 'F'ixed format? Phil ------------------------------ If the sequence is to do an EXFMT with that variable name defined in the display format, <b>then</b> CHAIN / READ a record from the file with the same variable name defined in the record format, the contents of the variable are being replaced by the last operation. Either load the variable from the file prior to displaying it on the screen (if the current value needs displaying) or use a different name for the variable on the display format. Splat ------------------------------ Phil, My apologies. I didn't see your comment about the sequence of events until after I'd posted the above. Splat ------------- Don't apologize for trying to help..the key was his response -- the value was in the field even after the update .. I don't think his program sees the field in the file .. thus the question about Fixed format ... Phil ------------------ Please tell the problem/solution .. it might help others. Phil
Last Wiki Answer Submitted:  September 11, 2009  7:52 pm  by  philpl1jb   44,180 pts.
All Answer Wiki Contributors:  philpl1jb   44,180 pts. , Splat   5,670 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

yes.. exactly…
in debug mode i checked the value of var1 and it looks ok…after that it performs update…

one point here is this is the maintenance program var1 is the new field added to database PF…
and i’m modifying the existing program to just add this new variable….i checked the source code for
the newly added field and there appears to be no constraint added in the code for var1

 895 pts.

 

i’m updating directly the PF

 895 pts.

 

What happens if you do EVAL var1 just after the update? – it looks good too.

 895 pts.

 

Thanks you all for your help…

I got my program running now…

-NG

 895 pts.