I frequently have issues with subfiles. I start off copying existing code (which may have been written 10+ years ago) and then try to get it to do what the users want. I have an article from RPGPGM.COM that has an example subfile program (by Simon Hutchinson). It seems straightforward enough, but when I try to mix in the logic I need to present the screen for entry, I get all turned around on the indicators. I know my problem has something to do with SFLDSP and SFLDSPCTL, but I'm not quite sure what.
So, code parts --> this is supposed to load the sub file
Immediately after that, it goes back here:
It's dying on the EXFMT with my best frenemy - RNX1255
My wonderful company won't pay for training. I try to find answers by Google - and asking the guy beside me who has more experience. I don't know why I have a mental block when it comes to these subfiles, but I struggle with it every time.
Plus, there are too many options.... for now, I need a method to follow every time until I get the hang of it!
Sorry; there was some venting in there. Any help with SFLDSP and SFLDSPCTL (or a "Dummies" book recommendation) will be greatly appreciated.
So, code parts --> this is supposed to load the sub file
PHP Code:
//SflDspCtl = *off;
*IN91 = *Off; //I switched to the indicator because I was afraid I didn't have INDDS set up correctly
//SflDsp = *Off;
*IN92 = *Off;
Write Ctlv01 ;
//SflDspCtl = *On;
*IN91 = *On ;
Wk@EOF = *Off;
DOU Wk@EOF = *On;
EXSR $065_READ;
If WK@eof = *On;
Leave;
ENDIF;
Write SUBV01;
ENDDO;
IF REC001 > 1;
//SFLDSP = *ON;
*IN92 = *ON;
ENDIF;
PHP Code:
dow (1 = 1);
Write FOOTER1;
ExFmt CTLV01;
If Exit;
Leave;
elseif (F6);
EXSR ReadSubFile;
iter;
elseif (
S1Plant <> SAVs1Plt or
S1LDDte <> SAVs1LDte or
S1UPDLOAD <> SAVs1OFSLd);
Exsr KeyChange;
Exsr loadsubfile;
iter;
ENDIF;
//If SFLDSP = *ON;
// EXSR ReadSubFile;
// ENDIF;
ENDDO;
*inlr = *on;
It's dying on the EXFMT with my best frenemy - RNX1255
My wonderful company won't pay for training. I try to find answers by Google - and asking the guy beside me who has more experience. I don't know why I have a mental block when it comes to these subfiles, but I struggle with it every time.
Plus, there are too many options.... for now, I need a method to follow every time until I get the hang of it!
Sorry; there was some venting in there. Any help with SFLDSP and SFLDSPCTL (or a "Dummies" book recommendation) will be greatly appreciated.
Comment