|
hi Lugman I was wondering why you want to prompt for the fields separately rather than display the whole screen and have the user key in both the contract and the date at the same time? OVERLAY expects the different display record formats to start on different lines, so the keyword won't help you here. To achieve what you're trying to do you have two choices. One is to add FLD001 and it's label to record format R2, but change the field to be "output only" rathe than "Both": A DSPSIZ(24 80 *DS3) A R R1 A* A 4 10'contract' A FLD001 4S 0B 4 20 A R R2 A* A 4 10'contract' A FLD001 4S 0O 4 20 A 4 45'date' A FLD002 4S 0B 4 51 FTK CF E WORKSTN DFLD001 S 4 0 DFLD002 S 4 0 C EXFMT R1 C EXFMT R2 C EVAL *INLR = *ON C* Alternatively you could condition the "record 2" fields with display indicators: A CA03(03 'Exit') A* ------------------------------------------------------ A DSPSIZ(24 80 *DS3) A R SCREEN1 A 4 10'contract' A FLD001 4S 0B 4 20 A 51 DSPATR(PR) A* A 51 4 45'date' A 51 FLD002 4S 0B 4 51 FTST003FM CF E WORKSTN D Fld001 S 4 0 D Fld002 S 4 0 * Repeat until F3 pressed... C DoU *In03 = *On * Show the "first record"... C Eval *In51 = *Off C ExFmt Screen1 * Display the "second record" if F3 wasn't pressed... C If *In03 <> *On C Eval *In51 = *On C ExFmt Screen1 C EndIf C EndDo * Exit the program... C Eval *InLR = *On All the best Jonathan -----Original message----- From: "Luqman" pearlsoft@xxxxxxxxxxxx Date: Thu, 27 Jan 2005 11:04:59 +0000 To: rpg400-l@xxxxxxxxxxxx Subject: Display Fields of Record No. 2 on Right of Record No. 1 ? > I want Display Field of Record No. 2 on Right of Record No. 1, but I tried > using OVERLAY but still its not working, if I put Field of Record No. 2 one > line below Record No. 1 then both records appear,but in case of both having > on same line, record no. 1 field disappears, any idea please ? > I need something like this, because I waant to validate the Contract No. > before going to Contract Date Field. > > Contract No._______ (Record 1) Contract Date __________ (Record 2) > > Here is my code. > *************** Beginning of data ********** > 0002.00 FTK CF E WORKSTN > 0002.01 DFLD001 S 4 0 > 0002.02 DFLD002 S 4 0 > 0002.03 C EXFMT R1 > 0002.04 C WRITE R1 > 0002.05 C EXFMT R2 > 0147.00 C EVAL *INLR = *ON > 0148.00 C* > ****************** End of data ************* > > My DDS Code is: > > *************** Beginning of data > ************************************* > 0000.10 A*%%TS SD 20050127 154846 LUQMAN REL-V5R2M0 5722-WDS > 0000.20 A*%%EC > 0000.30 A DSPSIZ(24 80 *DS3) > 0000.40 A R R1 > 0000.50 A*%%TS SD 20050127 154717 LUQMAN REL-V5R2M0 5722-WDS > 0000.60 A 4 10'contract' > 0000.70 A FLD001 4S 0B 4 20 > 0000.80 A R R2 > 0000.90 A*%%TS SD 20050127 154846 LUQMAN REL-V5R2M0 5722-WDS > 0001.00 A OVERLAY > 0001.10 A 4 45'date' > 0001.20 A FLD002 4S 0B 4 51 > ****************** End of data > **************************************** > > Best Regards, > > Luqman > > > > > > > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > Jonathan Mason www.astradyne-uk.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.