To use Arithmetic operations in Cl program

5 pts.
Tags:
CL programming
CL/400
Hi, i am fresher for AS400.I dont know how to retreive a sysval using arithmetic operations in cl programming and too storing in a dataarea and displaying the result through msg

Answer Wiki

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

Hi,

Take a look at the RTVSYSVAL command to retrieve a sysval.
You will need to DCL your variables before using them.
You can store data in a data area using CHGDTAARA and retrieve it using RTVDTAARA.
You can display the result using one of the SNDMSG, SNDPGMMSG, SNDBRKMSG or SNDUSRMSG commands.

There is plenty of help available on the commands – press the help key and you can read the info.

Regards,

Martin Gilbert.

Discuss This Question: 1  Reply

 
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
  • TomLiotta
    how to retreive a sysval using arithmetic operations in cl programming... You don't use "arithmetic operations" to retrieve system values. You use arithmetic operations to perform arithmetic such as addition, subtraction and multiplication. ...and too storing in a dataarea... You store values in a data area with the CHGDTAARA command. But why would you do that? The value is already stored in the system value. Generally there would by two likely reasons for a data area -- to save the value temporarily after changing the system value or to send the data area to another system. But you can store the value in a variable if it's temporary and sending system values to another system is better done by using RTVSYSINF and UPDSYSINF. If complete SYSINF (system information) isn't needed, specific system values can be extracted from the SYSINF objects. ...and displaying the result through msg What result do you want to display? Different system values require different handling for messages. Some values are simple character strings that can be directly inserted into message text. Other system values are numeric that can require programming to make them available as text. Still others are lists of values that can have different numbers of elements and different data attributes. Also, what kind of message do you want to create? Is it a formatted message with a specific description? Is it an impromptu message that you display on an interactive screen through the device message queue? Is it a message that displays with other joblog messages? Tom
    125,585 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