× 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: System Date Retrieval
  • From: "G.R.Srinivas" <srinivasgr@xxxxxxxxx>
  • Date: Thu, 28 Jan 1999 07:19:13 -0800 (PST)

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                      
C                     WRITEDATREC                  
C                     SETON                     LR

Input --:
                        
 DATE :    1999-01-01   
                        

PF output --:
                                Display Report                        
      
                                             Report width . . . . . : 
    10
Position to line  . . . . .              Shift to column  . . . . . . 
      
Line   ....+....1                                                     
      
       DAT1                                                           
      
000001 0001-01-01                                                     
      
000002 0001-01-01                                                     
      
****** ********  End of report  ********                              
      
                                                                        
The CLP code is
PGM                                                      
             DCLF       A                                
             DCL        VAR(&DAT1) TYPE(*CHAR) LEN(26)   
             RTVSYSVAL  SYSVAL(QDATE) RTNVAR(&DAT1)      
             SNDRCVF    RCDFMT(DA)                       
                                                         
ENDPGM

There was no compilation error but hte runtime error was
CPF1095 received by DATCL at 400.
whatever length I give I get this message.

If anyone could help me, I would be very much obliged.
THANKS A LOT in advance.

Srinivas.


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