Code: Select all
if (Grid.Selected = *on); // process only "selected" rows
Code: Select all
if (Grid.Selected = '1'); // process only "selected" rows
Code: Select all
if (Grid.Selected = *on); // process only "selected" rows
Code: Select all
if (Grid.Selected = '1'); // process only "selected" rows
Code: Select all
if (Grid.Selected = iON); // process only "selected" rows
Well, to prove there was a problem, I also ran it through debug and (even though the PUI named indicator had a '1' value in it) the IF statement comparing the PUI named indicator to *ON evaluated as FALSE and the ELSE code was executed. After I created a constant with a '1' value and used that in the comparison, then the TRUE part of the IF-ELSE-ENDIF construct executed as desired.Scott Klement wrote:I always use *ON and *OFF with named indicators, works fine here.
Yes, I'm now painfully aware of that.Scott Klement wrote:(since DDS doesn't support actual named indicators)
Code: Select all
dow ReadingChangedRows(); // read all changed rows
Grid.Changed = *off; // clear row changed indicator
if (Grid.Selected = *on); // process only "selected" rows
Grid.Selected = *off; // clear row selected indicator
if Screen.mnuOption <= *blanks; // if no option selection entered
Screen.sflpos = 1; // reset subfile position to top
else; // else
Screen.sflpos = sflrrn; // set subfile position to this record
select;
when (Screen.mnuOption = 'Add'); // add to subfile
add_to_subfile = *on; // turn on flag for delayed processing
when (Screen.mnuOption = 'Change'); // change or insert this row
callp UpdateThisValue();
when (Screen.mnuOption = 'Delete'); // delete this row
callp DeleteThisValue();
when (Screen.mnuOption = 'Features'); // manage features for this row
pKeyData.Application = Grid.APPNME; // pass selected key data
pPgmName = TrgMgt_NextTabProgram(proc_pgm); // go to next screen
leave; // exit from subfile processing
when (Screen.mnuOption = 'Refresh'); // rebuild the screen
rebuild_screen = *on;
other;
errors_found = *on; // set program error indicator on
Grid.Changed = *on; // flag grid row as changed
Grid.Selected = *on; // flag grid row as selected
GenUtl_GetMessageText( 'ACL0004'
: %subst(%char(sflrrn) + ' ':1:5)
+ Screen.mnuOption
: var_msg );
Screen.ERROR_MSG = var_msg;
Screen.ERROR_IND = *on;
endsl;
endif;
else; // row not selected
Grid.Protected = *on; // set all fields back to protected mode
Grid.APPNME_PC = *off; // make sure field attr indicators are off
Grid.APPCDE_PC = *off;
Grid.APPENA_PC = *off;
Grid.ALLUSE_PC = *off;
Grid.APPDSC_PC = *off;
endif;
eval-corr Grid_Out = Grid; // move corresponding input data to output
update ACTMAPLD.ACTMAPLS Grid_Out; // update subfile record
enddo; // loop on subfile records
Code: Select all
D NamedInd s 1a
/free
NamedInd = '1';
if NamedInd = *ON;
dsply 'on';
else;
dsply 'off';
endif;
*inlr = *on;
Users browsing this forum: No registered users and 0 guests