There are many ways to do this, which you can learn in a class on RPG, or programming in general. This is not rocket science.

Assuming Y2K compliancy is not needed (or even include YEAR), one simple way would be to create an array (defined in the "E" specifications) called MON for month or PER for period, with 12 values consisting of: Jan; Feb; Mar; Apr; May; Jun: Jul; Aug; Sep: oct; Nov; Dec.

You then display on the screen the value MON,MM where MON is your array and MM is month extracted from the date which you can do with a data structure at end of input specifications, by overlaying the unpacked date with definition of field MM, or you can also extract it with a move to smaller field (assuming date field is not complicated with having year in there).

RPG/400--->
  i have a   physical file...  field (suppose date of birth)

  EMPDAT     4P 0      TEXT('EMPLOYEE DATE OD BIRTH')
(length 4 packed with zero decimal places )
  EMPNME  20A         TEXT('EMPLOYEE NAME')

   date(EMPDAT) should be stored as DD-MM the data base file but when it is
   displayed on the screen (say screen1). it should be displayed as
  DD -MMM(e.g. 27 - oct)''please tell me how to  do this..
  thank you .....
  :))



---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.