Good afternoon,
converting an existing program from using SQL to regular Do/Enddo read cycle. I am reading a Logical PRMSTRL3 with one key, MSSNO and using that value to read from another file and process records.
File is stated as below:
*---------------------------------------------------------*
* *
*---------------------------------------------------------*
R PRMSTRF PFILE(PRMSTR)
K MSSNO
*--------------------------------------------------------*
* ---------------------------------------------------------
In the program:
H Option(*NoDebugIO:*SRCSTMT)
FCSTHST IF E K Disk
FEMP125L3 IF E K Disk
FPRMSTRL3 IF E K Disk
F*
//set compiler options
exec sql set option COMMIT = *NONE,
COMPILEOPT = 'DFTACTGRP(*no) ACTGRP(*new)';
Main Code:
Dou %EOF(PRMSTRL3);
Read PRMSTRL3;
If not %EOF(PRMSTRL3);
@Print = ' ';
If mssno <> savesocial;
savesocial = mssno;
else;
iter;
Endif;
Setll SaveSocial Emp125L3;
Dou %EOF(Emp125L3);
Reade SaveSocial Emp125L3;
If not %EOF(Emp125L3);
If EFFDAT < Begyear and TRMDAT <> 0 and
TRMDAT < BegYear;
iter;
Endif;
If @Print <> ' ';
Exsr $Write;
Endif;
Endif;
EndDo;
Endif;
EndDo;
Write EndRpt;
Exsr $Eoj;
The only field I can see when in debug is MSSNO, EFFDAT & TRMDAT. EFFDAT & TRMDAT are from the second file. Can't see any of the other fields. Compile debug value is *SOURCE. It is set as a SQLRPGLE pgm type. I changed that and it did not help. I took out the compiler options and that didn't help either. I would like to see the other field values of the record that was read. Any input would be appreciated.
Thanks
converting an existing program from using SQL to regular Do/Enddo read cycle. I am reading a Logical PRMSTRL3 with one key, MSSNO and using that value to read from another file and process records.
File is stated as below:
*---------------------------------------------------------*
* *
*---------------------------------------------------------*
R PRMSTRF PFILE(PRMSTR)
K MSSNO
*--------------------------------------------------------*
* ---------------------------------------------------------
In the program:
H Option(*NoDebugIO:*SRCSTMT)
FCSTHST IF E K Disk
FEMP125L3 IF E K Disk
FPRMSTRL3 IF E K Disk
F*
//set compiler options
exec sql set option COMMIT = *NONE,
COMPILEOPT = 'DFTACTGRP(*no) ACTGRP(*new)';
Main Code:
Dou %EOF(PRMSTRL3);
Read PRMSTRL3;
If not %EOF(PRMSTRL3);
@Print = ' ';
If mssno <> savesocial;
savesocial = mssno;
else;
iter;
Endif;
Setll SaveSocial Emp125L3;
Dou %EOF(Emp125L3);
Reade SaveSocial Emp125L3;
If not %EOF(Emp125L3);
If EFFDAT < Begyear and TRMDAT <> 0 and
TRMDAT < BegYear;
iter;
Endif;
If @Print <> ' ';
Exsr $Write;
Endif;
Endif;
EndDo;
Endif;
EndDo;
Write EndRpt;
Exsr $Eoj;
The only field I can see when in debug is MSSNO, EFFDAT & TRMDAT. EFFDAT & TRMDAT are from the second file. Can't see any of the other fields. Compile debug value is *SOURCE. It is set as a SQLRPGLE pgm type. I changed that and it did not help. I took out the compiler options and that didn't help either. I would like to see the other field values of the record that was read. Any input would be appreciated.
Thanks
Comment