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


  • Subject: Re: System Date Retrieval
  • From: "G.R.Srinivas" <srinivasgr@xxxxxxxxx>
  • Date: Fri, 29 Jan 1999 04:40:41 -0800 (PST)

Hi Victor,
That was GREAT. Thanks a lot.
Srinivas.



---Victor Raz <rvictor@hotmail.com> wrote:
>
> 
> 
> 
> 
> 
> >Hello Everyone,
> >
> >Can anyone help me in retrieving system date either in CLP or in RPG
> >and storing it in the PF. I am working on V4R3. I've tried the
> >following method but it didn't work.
> >
> >PF Member --:
> >R DATREC                
> >                  DAT1            L
> >
> >DSPF Member --:
> >A                                  5 21'DATE : '
> >A            DAT1      R     L  I  5 31REFFLD(DATREC/DAT1
TLIB1/DATE1)
> >
> >RPG Member --:
> >FDATE1   O   E                    DISK             
> >FA       CF  E                    WORKSTN          
> >C                     EXFMTDA                      
> 
> >
> >If anyone could help me, I would be very much obliged.
> >THANKS A LOT in advance.
> >
> >Srinivas.
> >
> *******************************************************
> Hi! 
> I hope it help you.
> 
>  IN DDS:
> A                R RFILE 
>  *
> A                DTE             L         TEXT('DATE')  
>                                                     COLHDG('DATE')
> 
> ***********************************************************
> IN RPG/ILE:
> 
> H DATEDIT(*YMD)  
> FFILEL01   UF A E           K DISK 
>  *                                                  
> C                   MOVE      *DATE         DTE
>   *                                                 
> C                   WRITE     RFILE                               
> C                   MOVE      *ON           *INLR 
> 
> ***************************************************************
> IN RPG:
> H            Y-  
> FFILEL01 UF  E           K        DISK                      A  
>  *
> 
> I            DS                                    
> I                                        1   80DAT 
> I                                        1   4 GOD 
> I                                        5   6 MES 
> I                                        7   8 DEN 
>  *
> C                            MOVE *DATE     DAT      
> C           GOD       CAT     '-'               DT        5
> C           DT          CAT     MES          DT1     7
> C           DT1        CAT     '-'                DT2     8
> C           DT2        CAT     DEN         DATE  10
> C                            MOVE DATE      DTE
>  *
> C                           WRITERFILE
>  *
> C                           MOVE *ON       *INLR 
> *************************************************************
> !!!!!!  Create RPG/400 Program (CRTRPGPGM) !!!!!!!!!
> 
> Type conversion options  . . . . CVTOPT       > *DATETIME  
> *************************************************************
> 
> 
> IN CLP:
>              PGM                                                    
   
>              DCL        VAR(&DAT) TYPE(*CHAR) LEN(6)                
   
>              RTVJOBA    DATE(&DAT) 
>                                      
>              CVTDAT     DATE(&DAT) TOVAR(&DAT) TOFMT(*YMD) +        
                                                             
> TOSEP(*NONE) 
>              /* You can convert the date to any format */
>            ENDPGM
> *************************************************************
> 
> 
> IN FMT:
>  A          R FMCHG      
>   **********
>   ********** 
> 
>  A            DTO_D          6Y 0O  3 61EDTCDE(Y) 
>   *
>  A            DTE_D          6  0B  7 24EDTCDE(Y)   
>  A                                      DSPATR(HI)  
>  A                                     7 33'(DDMMYY)'  
>  A            DTL_D         10A  O 13 24   
> 
> 
********************************************************************** 
> 
> 
> IN RPG/ILE:
> 
> H DATEDIT(*YMD)                        
>  *
> FFILE01FM  CF   E             WORKSTN 
> 
**********************************************************************
> D #D#DMY          S               D   DATFMT(*DMY)                  
  
> D #D#YMD          S               D   DATFMT(*YMD)             
> D #D#EUR          S               D   DATFMT(*EUR)        
> 
**********************************************************************
> C     *YMD          Move      *DATE            #D#DMY   
> C                          MoveL     #D#DMY        DTO_D   
>  *
> C                          Move      DTE                  #D#EUR    
         
> C                          Move      #D#EUR         DTL_D    
> C     DTL_D       IfEq         '01.01.0001'           
> C                          Move      *Blanks            DTL_D    
> C                          EndIf                            
>  *           
> C                          EXFMT     FMCHG    
> C     DTE_D      IfNe           *Zeros               
> C     *DMY         Move        DTE_D         #D#YMD 
> C                         Move        #D#YMD        DTE 
> C                         ENDIF                          
> C                         MOVE      *ON                 *INLR 
> 
********************************************************************** 
> best wishes,
> 
> Victor.
> 
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * *
> * This is the RPG/400 Discussion Mailing List!  To submit a new     
   *
> * message, send your mail to "RPG400-L@midrange.com".  To
unsubscribe   *
> * from this list send email to MAJORDOMO@midrange.com and specify   
   *
> * 'unsubscribe RPG400-L' in the body of your message.  Questions
should *
> * be directed to the list owner / operator: david@midrange.com      
   *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * *
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.