Midrange News for the IBM i Community

Posted by: renojim
Green screen indicator issue
has no ratings.
Published: 08 Nov 2011
Revised: 23 Jan 2013 - 1976 days ago
Last viewed on: 21 Jun 2018 (4547 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Green screen indicator issue Published by: renojim on 08 Nov 2011 view comments(3)

Forgive me, I haven't worked on green screens for a very long time, and may never see one again. Wasn't very good at it when I did. Nevertheless, I want to RI a field on error in an old program. I have a field defined in DDS thusly:


A            CTRTYP         2Y 0I  7 10DSPATR(HI)
A N40                                         DSPATR(ND)


So I add a line:

A            CTRTYP         2Y 0I  7 10DSPATR(HI)
A N40                                         DSPATR(ND)
A  99                                          DSPATR(RI)


And on error I turn *in99 on, and GOTO (I know, I know) to right before the WRITE/EXFMT, which is just a few lines previous. And the field refuses to display at all. Verified in debug that *in40 is still on, and I can't find anything else that should impact the display of that field. Am I doing something obviously wrong? Code looks like this:


C     $ADRECS       BEGSR                                              
C     #redisp       TAG                                                
C   77              SETON                                        51    
C                   SETON                                        405254
C                   WRITE     FORMAT2                                  
C                   EXFMT     CONTROL1                                 
    here I'm checking for error, which would be duplicates found, in numrecs
C                   if        numrecs > 0                                
C                   eval      *in99 = *on                                
C                   goto      #redisp                                    
C                   else                                                 
C                   eval      *in99 = *off                               
C                   endif                           


Return to midrangenews.com home page.
Sort Ascend | Descend