× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Perfect, thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Troy Bryant 
Analyst Programmer
Patrick Autocare.
Phone: +61 03 9926 9913
Fax: +61 03 9926 9977
Mobile: +61 0408 397 333
T.Bryant@xxxxxxxxxxxxxx




Simon Coulter <shc@xxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
29/09/2004 08:21 PM
Please respond to RPG programming on the AS400 / iSeries

 
        To:     RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
        cc: 
        Subject:        Re: Drop Down Selection List



On 29/09/2004, at 3:59 PM, T.Bryant@xxxxxxxxxxxxxx wrote:

> I want the user to be able to select the month from a list on a green
> screen.
> I'm looking at SNGCHCFLD and CHOICE DDS keywords at the moment.  Do I 
> have
> to use choice and a number or can I just have a word, (eg, January)?
> Or is there a better way?

      A             R MTHCHCSFL                 SFL
      A               MTHSLT         1Y 0H
      A               MONTH         10A  O  5 26
      A             R MTHCHCCTL                 SFLCTL(MTHCHCSFL)
      A                                         SFLSIZ(12)
      A                                         SFLPAG(5)
      A                                         OVERLAY
      A                                         SFLSNGCHC(*RSTCSR 
*NOSLTIND)
      A                                         SFLRTNSEL
      A                                         SFLDSP
      A                                         SFLDSPCTL
      A N54                                     SFLEND(*SCRBAR *SCRBAR)

      FSNGCHCSFLDCF   E             WORKSTN SFILE(MTHCHCSFL:rrn)
      D rrn             S              4  0
      D months          S             10    DIM(12) CTDATA PERRCD(1)
      C                   FOR       rrn = 1 to %ELEM(months)
      C                   EVAL      MONTH - months(rrn)
      C                   WRITE     MTHCHCSFL
      C                   ENDFOR
      C                   EXFMT     MTHCHCCTL
      C                   READC     MTHCHCSFL
      C                   IF        NOT(%EOF)
      C     months(rrn)   DSPLY
      C                   ENDIF
      C                   SETON 
     LR
      C                   RETURN
** CTDATA(months) Months of the year - 12*10 bytes
January
February
March
April
May
June
July
August
September
October
November
December

That should do what you want.

On modern displays and controllers (e.g., PC5250, aXes, etc.) this will 
show a list of months. Move the cursor to the desired month and press 
the space-bar to select (or just click it with the mouse). Press Enter 
to process.

On older displays and controllers you would type a / next to the month 
you want (or use the space bar).

Regards,
Simon Coulter.
--------------------------------------------------------------------
    FlyByNight Software         AS/400 Technical Specialists

    http://www.flybynight.com.au/
    Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
    Fax:   +61 3 9419 0175                                   \ /
                                                              X
                  ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------


--
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.




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.