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




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  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.