Retrieve system date and time on AS/400

130 pts.
Tags:
AS/400 administration
AS/400 System Values
CL Program
How do I retrieve the current system date, time and name using CL program on AS400?

Pls share the CL source.

 

Answer Wiki

Thanks. We'll let you know when a new response is added.

How do I retrieve the current system date using CL program on AS400?

Pls share the CL source.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Mani1017
    Here is my program and it's not working, PGM PARM(&CURRENT &SYSNAME) DCL VAR(&CURRENT) TYPE(*CHAR) LEN(6) DCL VAR(&SYSNAME) TYPE(*CHAR) LEN(10) RTVSYSVAL SYSVAL(QDATE) RTNVAR(&CURRENT) RTVNETA SYSNAME(&SYSNAME) DSPJRN JRN(XLOL/JRNL) OBJ((XLOL/*ALL *FILE + *ALL)) RCVRNG(*CURCHAIN) + FROMTIME(&CURRENT) TOTIME(&CURRENT) + OUTPUT(*OUTFILE) INCHIDENT(*YES) + OUTFILFMT(*TYPE5) OUTFILE(MAN/JRN_OBJ) endpgm While calling i am getting an error message : Parameters passed on CALL do not match those required
    130 pointsBadges:
    report
  • TomLiotta
    Parameters passed on CALL do not match those required From that message, it looks like you're not calling your program with the right parms. How do you call your program? Your program statements are saying that it needs two parameters when called -- the first parm needs to be at least six characters and the second needs to be at least ten characters. Tom
    125,585 pointsBadges:
    report
  • Yorkshireman
    Incidentally FROMTIME(&CURRENT) TOTIME(&CURRENT) + is a bit suspect. There won;t be much data during that period..
    6,085 pointsBadges:
    report
  • TomLiotta
    Just as a general note, I see systems from time to time that can have well over a thousand entries per second. Tom
    125,585 pointsBadges:
    report
  • graybeard52
    PGM PARM(&CURRENT &SYSNAME)
    You are requiring the calling program to supply the date and system name, then you go retrieve them. You probably want this line to be just
    PGM
    3,115 pointsBadges:
    report
  • Brijesh
    Here have a loook at this thread Time and date in AS/400 which may assist you with some idea.
    14,450 pointsBadges:
    report
  • dattatrayphalle
    How do I retrieve the current system date using CL program on AS/400?
    70 pointsBadges:
    report
  • pdraebel
    Take a good look at the RTVSYSVAL command. Use F4 (prompt) and F1 (Help) to get more info on the command. Generally it would be Like RTVSYSVAL SYSVAL(A)
              RTNVAR(&B)
    &B is the Cl varriable holding the System value that was retrieved.
    7,485 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: