window with a footer

10 pts.
Tags:
RPGILE
when outputing a window, how can I get a footer within that window?

 



Software/Hardware used:
as400
ASKED: January 8, 2010  4:22 PM
UPDATED: January 9, 2010  11:12 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Are you talking about a window subfile? If so, here is one I did back in 1995. You should be able to modify it to suit your needs.

DDS:

<pre>

A DSPSIZ(24 80 *DS3)
A PRINT
A CF03(03 ‘EXIT’)
A R WS1
A WINDOW(2 25 15 48)
A WDWBORDER((*COLOR BLU) (*DSPATR RI)-
A (*CHAR ‘ ‘))
A RMVWDW
A USRRSTDSP
A 14 2′CMD 3 = ACCEPT CODE’
A DSPATR(HI)
A R WSFL SFL
A WSEL 1A I 3 1
A RESNCD R O 3 6REFFLD(QREASN/RESNCD *LIBL/ADCQACD-
A F)
A RESNDS R O 3 11REFFLD(QREASN/RESNDS *LIBL/ADCQACD-
A F)
A R WSFLCTL SFLCTL(WSFL)
A SFLSIZ(0011)
A SFLPAG(0010)
A WINDOW(WS1)
A N81 ROLLUP(26)
A OVERLAY
A N80 SFLDSP
A N80 SFLDSPCTL
A 80 SFLCLR
A 81 SFLEND
A SFPAGE 4S 0H SFLRCDNBR
A 1 14′Quarantine Reason Codes’
A DSPATR(HI)

</pre>

RPG Code:

<pre>

‚**********************************************************************
‚* PROGRAM NAME: ADCQR02 *
‚* CREATION DATE: 08/10/95 *
‚* PURPOSE OF PROGRAM: TO ALLOW INQUIRY OF QUARANTINE REASON *
‚* CODES *
‚**********************************************************************
‚* FILES USED IN PROGRAM *
‚**********************************************************************
FADCQS02 CF E WORKSTN
F SFILE(WSFL:RRN)
FADCQACDF IF E K DISK
‚*
C *ENTRY PLIST
C PARM SCODE 3
‚*
‚****************************************************************
‚* INITIALIZE SUBFILE *
‚****************************************************************
C *IN03 DOWEQ ’0′
C MOVE ’1′ *IN80
C WRITE WS1
C WRITE WSFLCTL
C MOVE ’0′ *IN80
C Z-ADD 0 RRN 4 0
C Z-ADD 0 LSRRN 4 0
‚****************************************************************
‚* SETLL ON REASON FILE *
‚****************************************************************
C *LOVAL SETLL ADCQACDF
‚****************************************************************
‚* EXECUTE SUBROUTINE TO LOAD SUBFILE *
‚****************************************************************
C DSP1 TAG
C EXSR LOD
‚****************************************************************
‚* DISPLAY SUBFILE *
‚****************************************************************
C WRITE WS1
C EXFMT WSFLCTL
‚****************************************************************
‚* CHECK FOR SUBFILE ROLL *
‚****************************************************************
C *IN26 IFEQ ’1′
C GOTO DSP1
C END
‚*
C *IN03 IFEQ ’1′
C MOVE ’0′ *IN45
‚****************************************************************
‚* READ SFL AND EXECUTE SUBROUTINE IF CHANGED RECORDS ARE FOUND*
‚****************************************************************
C *IN45 DOWEQ ’0′
C READC WSFL 45
C *IN45 IFEQ ’0′
C WSEL ANDNE ‘ ‘
C MOVEL RESNCD SCODE 3
C END
C END
‚*
C MOVE ’1′ *INLR
C RETURN
C END
‚*
C END
‚*
‚****************************************************************
‚* SUBROUTINE TO LOAD MATERIALS SFL *
‚****************************************************************
C LOD BEGSR
C Z-ADD 0 COUNT 4 0
C Z-ADD 0 SFPAGE 4 0
C Z-ADD LSRRN RRN
C MOVE ’0′ *IN81
‚****************************************************************
‚* LOAD ONLY A PAGE AT A TIME *
‚****************************************************************
C *IN81 DOWEQ ’0′
C COUNT ANDLT 10
C *IN03 ANDEQ ’0′
C READ ADCQACDF 81
C *IN81 IFEQ ’0′
C ADD 1 COUNT
C ADD 1 RRN
C WRITE WSFL
C END
C END
C RRN IFNE 0
C Z-ADD RRN SFPAGE
C Z-ADD RRN LSRRN 4 0
C Z-ADD RRN LHRRN 4 0
C END
C ENDSR
</pre>

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Easiest for me is similar to the example in Teandy's answer -- put the "footer" data in the WINDOW() format. The example has WS1 format that has 'CMD 3 = ACCEPT CODE' as a kind of "footer" constant from my reading of it. In principle, that's what I've done most often. If it works, why not? Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Great answer Teandy The footer can be put in a seperate record, if you want
    A          R WFOOT                      
    A                                          WINDOW(WS1) 
    A                                          OVERLAY
    A                                 14  2'CMD 3 = ACCEPT CODE'                   
    A                                           DSPATR(HI)  
    
    In the RPG you would write wfoot just before the exfmt command. Phil
    48,595 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following