ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Compiler listing says "O*(NOTOUT)"?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compiler listing says "O*(NOTOUT)"?

    Hi!

    I get from the compiler this (it's a WORKSTN file):


    This is a part of the DDS for it:
    Code:
    0010.50      A          R FMGESTION                                                            
    0010.60      A*%%TS  SD  20131208  193820  ARGASOFT    REL-V5R3M0  5722-WDS                    
    0010.70      A                                      CF03                                       
    0010.80      A                                      CF10                                       
    0010.90      A* 99                                  OVERLAY                                    
    0011.00      A                                  1 32'GESTIONE PROVINCE'                        
    0011.10      A                                  1 65'© argasoft elba'                          
    0011.20      A            NOTIZ         70   O  3  6COLOR(RED)                                 
    0011.30      A                                  5 25'inserire i dati in tutti i campi'         
    0011.40      A                                      COLOR(YLW)                                 
    0011.50      A                                  7 17'sigla ...........'                        
    0011.60      A            PVNCHIAVE R    2A  B  7 35                                           
    0011.70      A  30                                  DSPATR(PC)                                 
    0011.80      A N30                                  COLOR(TRQ)                                 
    0011.90      A  30                                  COLOR(RED)                                 
    0012.00      A                                  9 17'denominazione ...'                        
    0012.10      A            PVNDESCRI R   30A  B  9 35                                           
    0012.20      A  31                                  DSPATR(PC)                                 
    0012.30      A N31                                  COLOR(TRQ)                                 
    0012.40      A  31                                  COLOR(RED)
    Program and DDS compiled correctly. No errors when calling. Checked with DEBUG program steps.
    I use EXCPT FGEST1 in the program as I have a subroutine to check input validity and want to display in case of errors (30 31 indicators) and the return to main part with a READ operation on the PROVINFMT display file.

    What's wrong?

    Hope you can read it.

    TIA and a good 2014 to everyone.
    Arnaldo

  • #2
    Re: Compiler listing says "O*(NOTOUT)"?

    can you post all the dds?
    or at least this record..

    Thank you
    Jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Compiler listing says "O*(NOTOUT)"?

      Hi argasoft36:

      I'm not following the issue.

      It sounds like you are:
      1. outputting display format FMGESTION.
      2. doing some edits on that format.
      3. trying to read display format PROVINFMT.

      Is that correct?

      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: Compiler listing says "O*(NOTOUT)"?

        It's unclear to me what the problem is.... Your message says everything compiles and runs properly. The topic shows an O-spec commented out, but surely you aren't getting that message at run-time, and you said it compiles correctly... So... what problem are you having?

        Also, you said you're using EXCPT (the RPG III version of EXCEPT) to write to a display file?? This display file appears to be externally defined, why would you use EXCPT?

        Comment


        • #5
          Re: Compiler listing says "O*(NOTOUT)"?

          As said above, need to see more. EXCPT FGEST1 is not a format that we can see. I also don't understand why you are using Debug for validation? If it works then it works. What is the error you are having?
          Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

          Comment


          • #6
            Re: Compiler listing says "O*(NOTOUT)"?

            For EXCEPT output specs, the "(NOTOUT)" means that a field exists in the record format that is "not output". That happens when the E-line does not have the field listed after in the following O-specs.

            If you want a field to be output for EXCEPT lines, the field must be coded in the O-specs. It's not an error to have EXCEPT output coded that has no listed fields, so there's no reason the program wouldn't compile and run just fine.

            It would be a lot easier to help with this if the relevant program source code was included, but it's simply a matter of very unusual use of EXCEPT output.
            Tom

            There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

            Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

            Comment


            • #7
              Re: Compiler listing says "O*(NOTOUT)"?

              Hi and thanks for your replies.

              I see now that only one code is in my message: I'm quite sure to have copied also part of the compiler listing but here it is:
              Click image for larger version

Name:	Compiler.png
Views:	1
Size:	23.7 KB
ID:	126715

              The display file has two record formats:
              - FMGESTION to make the input/update
              - FMLIST to list records in the file to chose for upade

              The program is as follows:
              - EXSR LIST (if no records in file, load FMGESTION, otherwise load FMLIST)
              - TAG CYCLE with a SETOFF of all *IN
              - READ FMPROV (the DDS file containing FMGESTION and FMLIST)
              - if KC ON GOTO END, and SETON LR
              - *IN01 ON if FMGESTION is read
              - *IN02 ON if FMLIST is read
              - if *IN01 ON EXSR CKFMT1 for input validity where
              - in case of errors, indicators (30, 31, ... in DDS) are set ON and FMGESTION is loaded
              - if all correct record is updated/added and FMLIST is loaded
              - ENDSR
              - GOTO CYCLE

              I find it easier to read/check/update a program if I have, normally, a subroutine to load a display and one to check the input and that's why I use EXCEPT and not EXFMT.

              I thought that having an external file definition a coding of 'O'-specs would not be necessary as filed names and locations are known by the compiled program and that the only difference between EXCEPT and EXFMT was that the second performs also a READ on ENTER without having to digit the READ operation code.

              If I use WRITE no 'O'-specs have to be defined but is this operatione code also for WRLSTN files? IBM's ILE Reference Guide says that this writes a new record to the file.

              I've setup a printer file to show me *IN status and field values at certain points: that's my DEBUG and it's ok.

              The errors I get is that FMGESTION is re-displayed after typing some errors (my home-made debug states that error indicators (as per DDS) are ON) but NO values in the fields and NO red coloureds NOR a correct cursor positioning.

              Should you need more info, I'll give a link to download pdfs of ILE-source and DDS of PF and DSPF.

              I'm not a complete newbie as I used to develop applications for a travel agency until 1997/8 on an Advanced36 (was not mine) with RPGII SSP 7.0.
              Nowadays I want to develop for my own activity using an AS400 hosting service that does not have an S36 environment for security reasons (they say).

              Thanks for your help and all the best.
              Arnaldo

              Comment


              • #8
                Re: Compiler listing says "O*(NOTOUT)"?

                Yes, WRITE writes a new record. In this case, it's a new display file record. The record is written to the display using the record format that you name on the WRITE statement.

                An EXFMT statement also does a write; it simply combines it with a read so that both can be done with a single statement. The write is essentially the same that a WRITE statement would do.

                Your image of the 'O'-specs shows that you have no fields listed in your source. That explains why those fields do not have the expected values on the display. No fields were ever written to the display.
                Last edited by tomliotta; December 9, 2013, 10:44 PM. Reason: Source code comment added.
                Tom

                There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                Comment


                • #9
                  Re: Compiler listing says "O*(NOTOUT)"?

                  Hi Tom!

                  I interpreted "write new record" as "adding" and thought that it was not for WRKSTN files as just one record per time is in the file.

                  To resume, WRITE and EXFMT do not need 'O'-specs: used fields are written with their values at time and others with blanks. Am I right?

                  Thanks for quick replies and patience.
                  Arnaldo

                  Comment


                  • #10
                    Re: Compiler listing says "O*(NOTOUT)"?

                    Yes, you are understanding correctly. There are other possible details, but a common WRITE for an externally-described DSPF record format will not need any 'O'-specs in the source code.

                    But I'm not clear what you mean here:
                    ...used fields are written with their values at time and others with blanks.
                    What exactly do you mean by "used"? You have field usage of some fields as 'B'oth, for both input and output. Your program might not use those fields, but values could have been put into the display record. Those other values won't necessarily become blanks.
                    Tom

                    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                    Comment


                    • #11
                      Re: Compiler listing says "O*(NOTOUT)"?

                      Hi Tom!

                      With "used fields" I mean the ones used in the program. Obviously the blank ones are only in case of adding a new record.

                      Arnaldo

                      Comment


                      • #12
                        Re: Compiler listing says "O*(NOTOUT)"?

                        Okay, I think you have a good enough understanding. Any minor details related "used" fields will probably be clear to you as you continue testing. Post back if needed.
                        Tom

                        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                        Comment


                        • #13
                          Re: Compiler listing says "O*(NOTOUT)"?

                          WRITE works perfectly fine with WORKSTN files. This is the normal way to send output to the screen.

                          EXCEPT will do the same thing as WRITE _if_ you define all of the output fields in the O-specs. However, this is an obscure technique -- RPG programmers do not typically do this, so when another programmer reads your code, they will be very confused by your use of EXCEPT. Please consider using WRITE instead.

                          Comment


                          • #14
                            Re: Compiler listing says "O*(NOTOUT)"?

                            Thanks to all the repliers for the patience in answering what seem to be (and surely are) basic questions.

                            But for me it's just like knowing a language and asking for a translation.

                            Of course now all is OK after using WRITE op-code.

                            Arnaldo

                            Comment


                            • #15
                              Re: Compiler listing says "O*(NOTOUT)"?

                              Actually, it wasn't a bad question. I haven't run across anything that directly documents why "O*(NOTOUT)" appears in a compiler listing. It was only long experience that made it seem sensible. And I can understand why a RPG II developer would think of EXCEPT as you did. Sometimes things just have to be tried to learn how they work. (I still have bad feelings about how I wrote my first interactive RPG III program back on a S/38. It was before I learned that the RPG cycle wasn't a good idea, but I never got time to go back and do it right.)
                              Tom

                              There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                              Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                              Comment

                              Working...
                              X