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.

Thank you for visiting ITKE.

We are happy to help you with solving specific IT questions, but need as
much information as possible to do so. Let us know about the problem you
are trying to solve, how you are approaching it and what work you’ve
done so far, and we can help guide you in the right direction.

Discuss This Question: 5  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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..
    5,580 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

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following