Experts,
We are in V7R2M0.
I Declare open Fetch and close on an embedded SQL in RPGLE and I put all inside a For Loop.. I fetch to a data structure.
dcl-ds TestDS dim(1000) Qualified inz;
T_Flld1 char(9);
T_Fld2 pid char(1);
etc
For Loop for each employee
declare / open / Fetch to a Data Structure array / Close / Process .................... ( I should have kept the declare outside the loop )
End for
We have 2 different system and both area V7R2M0.
NOTE: I am not exclusively clearing the data structure for each for loop.........
System 1 : Employee 1 on first loop fetch .... and
2nd loop.......... System clears the Data Structure and loads the 2nd employee
System 2 : Employee 1 on first loop fetch .... and
2nd loop.......... System moves the 1st employee down the array and loads the 2nd employee info from 1st element.
If I put the exclusive CLEAR TESTDS, it will work on both system.
But, question is
1. why there is a difference on how this same code executed
2. How the system 2 is pulling the 1st employee down the array element and load the 1st employee from the 1st element..
Any body had this problem.
Please help.
Thank You
Stillin400
Comment