|
jonathan i am really sorry but i am learning rpg3 i couldnot understand rpgle upto the point,,,,,, i havent started rpgle yet... i need to do this in rpg -3 and in case of updating a physical file user will enter the date in DD-MMM format(e.g 2-jan ) and it should be stored in database in case of updating in dd - mm format which is packed decimal.....in rpg3 not in le.....please give me solution.. thanks for ur help so far..(solution for displaying and updating a physical file) in rpg -3 thasnks a lot... Jonathan Mason <jonathan.mason@xxxxxxxxxxxxxxxx> wrote: An easy way of doing this is with an array a bit of manipulation as the following example shows: D EmpDat s 4p 0 D Months ds D MthTxt 36a Inz('JanFebMarAprMayJunJulAugSep- D OctNovDec') D MthArr 3a Dim(12) Overlay(MthTxt) D ds D DDMM 4 0 D DD 2 0 Overlay(DDMM:1) D MM 2 0 Overlay(DDMM:3) D FmtDat s 8a C Eval EmpDat = 2710 C Eval DDMM = EmpDat C Eval FmtDat = %EditC(DD:'Z') + ' - ' + C MthArr(MM) C FmtDat Dsply C Eval *InLr = *On C Return Hope it helps Jonathan -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of sunny singh Sent: 16 April 2006 13:32 To: MIDRANGE-L@xxxxxxxxxxxx Subject: prob - storing date in rpg /400 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.
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.