ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RPG 3 - group records?

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

  • RPG 3 - group records?

    Hi

    I want group my records

    Code:
    Suspected:
    2012-06-07-12.09.40   SV   QAUDCTL   *AUDLVL
    2012-06-07-14.05.19   DO   TMPPF     AAUDP     *FILE
    Commands:
    2012-06-07-14.05.19 CD CCALL      QSYS      *CMD    NCALL PGM(AAUDP/AAUDP) PA
    2012-06-07-14.05.19 CD CDLTF      QSYS      *CMD    YDLTF FILE(AAUDP/TMPPF)
    Suspected group is realized by:
    PHP Code:
    C           *IN90     DOWEQ*OFF
    C                     READ QJORDJE4                 90
    C           
    *IN90     IFEQ *OFF
    C           JOENTT    IFNE 
    'CD'
    C           CTR       IFEQ 0
    C                     EXCPTOUTSUS
    C                     Z
    -ADD1         CTR     30
    C                     
    ENDIF
    C                     EXCPTOUTPUT
    C                     
    ENDIF
    C                     ENDIF
    C                     ENDDO 
    Should I add the same code for Commands group and again read all records?

    Below code which print records and group name:
    PHP Code:
    OQPRINT  E                OUTSUS
    O                                   10 
    'SUSPECTED:'
    OQPRINT  E                OUTPUT
    O                         JOTSTP    27
    O                                   21 
    ' '
    O                         JOENTT    23
    O                                   24 
    ' '
    O                         JOESD    125
    O                                   25 
    ' ' 
    Regards

  • #2
    Re: RPG 3 - group records?

    where are these records coming from?
    Are they in IFS or some table?
    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: RPG 3 - group records?

      looks like a journal entry output to outfile based on the file/field names...
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: RPG 3 - group records?

        Records coming from:
        DSPJRN JRN(QAUDJRN) USRPRF(&PROFILE) FROMTIME(&TM) +
        OUTPUT(*OUTFILE) OUTFILFMT(*TYPE4) OUTFILE(&LIBR/TMPPF)

        Comment


        • #5
          Re: RPG 3 - group records?

          build a file with fields in it. Then copy this file into it. You will now have all your fields + the fields of the buffer from the journal.

          Also a piece of me died when I saw the RPG 3 code. What year is it GregDrazek?
          Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

          Comment


          • #6
            Re: RPG 3 - group records?

            now for the real question...what exactly are you trying to accomplish? i'm thinking there has to be an easier way to get the desired results.
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: RPG 3 - group records?

              Originally posted by DeadManWalks View Post
              Also a piece of me died when I saw the RPG 3 code. What year is it GregDrazek?
              Dangit... now all my co-workers think I'm nuts because of the seemingly random snort that evoked...

              Comment

              Working...
              X