so i'm working on a names values handler and having a little trouble understanding how to access the DS info in QRNOPENACC
Jon Paris wrote a nice article here https://www.itjungle.com/2010/10/13/fhg101310-story01/
but I'm still scratching my head.
Example, i simply want to read the number of fields available in the file and then process each field.
I'll admit, i'm a little confused when it comes to pointers and i think that is where the issue.
So for example, i want to build a column list such as...
For i = 1 to Flds.num; //Process all namesValues fields
//Set the basing pointer to current field
Fld_p = %addr(Flds.field(i));
//Add to the column list if used
columnList += %TrimR(fld.externalName);
valuesList += '?'; // Add parameter marker
//If more than 1 value then add a comma to the lists
If i < Flds.num;
columnList += ', ';
valuesList += ', ';
EndIf;
EndFor;
Where Flds.xxx =
D QrnNamesValues_T...
D DS QUALIFIED TEMPLATE ALIGN
D num 10I 0
D field LIKEDS(QrnNameValue_T)
D DIM(32767)
I just don't know how to reference this DS info from my rpg handler pgm.
Can someone help?
Jon Paris wrote a nice article here https://www.itjungle.com/2010/10/13/fhg101310-story01/
but I'm still scratching my head.
Example, i simply want to read the number of fields available in the file and then process each field.
I'll admit, i'm a little confused when it comes to pointers and i think that is where the issue.
So for example, i want to build a column list such as...
For i = 1 to Flds.num; //Process all namesValues fields
//Set the basing pointer to current field
Fld_p = %addr(Flds.field(i));
//Add to the column list if used
columnList += %TrimR(fld.externalName);
valuesList += '?'; // Add parameter marker
//If more than 1 value then add a comma to the lists
If i < Flds.num;
columnList += ', ';
valuesList += ', ';
EndIf;
EndFor;
Where Flds.xxx =
D QrnNamesValues_T...
D DS QUALIFIED TEMPLATE ALIGN
D num 10I 0
D field LIKEDS(QrnNameValue_T)
D DIM(32767)
I just don't know how to reference this DS info from my rpg handler pgm.
Can someone help?
Comment