In this module, we will delve into advanced system configuration commands in Control Language (CL). These commands are essential for managing and configuring system settings, ensuring optimal performance, and maintaining system security. By the end of this module, you will be able to use these commands to configure and manage your system effectively.

Key Concepts

  1. System Values: Parameters that control the behavior of the system.
  2. Configuration Commands: Commands used to set and retrieve system values.
  3. Security Settings: Commands to manage system security configurations.
  4. Performance Tuning: Commands to optimize system performance.

System Values

System values are parameters that control various aspects of the system's operation. They can be modified to change the system's behavior.

Common System Values

System Value Description
QDATE System date
QTIME System time
QCCSID Default character set identifier
QSECURITY Security level of the system

Retrieving System Values

To retrieve a system value, use the RTVSYSVAL command.

RTVSYSVAL SYSVAL(QDATE) RTNVAR(&SYSDATE)

Explanation:

  • SYSVAL(QDATE): Specifies the system value to retrieve.
  • RTNVAR(&SYSDATE): Specifies the variable to store the retrieved value.

Setting System Values

To set a system value, use the CHGSYSVAL command.

CHGSYSVAL SYSVAL(QDATE) VALUE('2023-10-01')

Explanation:

  • SYSVAL(QDATE): Specifies the system value to change.
  • VALUE('2023-10-01'): Specifies the new value for the system value.

Configuration Commands

Displaying System Values

To display system values, use the DSPSYSVAL command.

DSPSYSVAL SYSVAL(QDATE)

Explanation:

  • SYSVAL(QDATE): Specifies the system value to display.

Changing System Values

To change system values, use the CHGSYSVAL command as shown earlier.

Example: Changing the System Time

CHGSYSVAL SYSVAL(QTIME) VALUE('12:00:00')

Explanation:

  • SYSVAL(QTIME): Specifies the system value to change.
  • VALUE('12:00:00'): Specifies the new time for the system.

Security Settings

Changing Security Level

To change the security level of the system, use the CHGSYSVAL command with the QSECURITY system value.

CHGSYSVAL SYSVAL(QSECURITY) VALUE('40')

Explanation:

  • SYSVAL(QSECURITY): Specifies the system value to change.
  • VALUE('40'): Specifies the new security level.

Displaying Security Settings

To display security settings, use the DSPSECA command.

DSPSECA

Explanation:

  • DSPSECA: Displays the security attributes of the system.

Performance Tuning

Changing Job Queue Attributes

To change the attributes of a job queue, use the CHGJOBQE command.

CHGJOBQE JOBQ(QBATCH) MAXACT(5)

Explanation:

  • JOBQ(QBATCH): Specifies the job queue to change.
  • MAXACT(5): Specifies the maximum number of active jobs.

Displaying Performance Data

To display performance data, use the DSPPFRDTA command.

DSPPFRDTA

Explanation:

  • DSPPFRDTA: Displays performance data for the system.

Practical Exercises

Exercise 1: Retrieve and Display System Date

  1. Retrieve the system date and store it in a variable.
  2. Display the retrieved system date.
DCL VAR(&SYSDATE) TYPE(*CHAR) LEN(10)
RTVSYSVAL SYSVAL(QDATE) RTNVAR(&SYSDATE)
SNDPGMMSG MSG('System Date: ' *CAT &SYSDATE)

Exercise 2: Change System Time

  1. Change the system time to 14:30:00.
  2. Verify the change by displaying the system time.
CHGSYSVAL SYSVAL(QTIME) VALUE('14:30:00')
DSPSYSVAL SYSVAL(QTIME)

Exercise 3: Set Security Level

  1. Change the security level to 30.
  2. Display the current security settings.
CHGSYSVAL SYSVAL(QSECURITY) VALUE('30')
DSPSECA

Common Mistakes and Tips

  • Incorrect System Value Names: Ensure you use the correct system value names. Refer to the documentation if unsure.
  • Value Formats: Pay attention to the format of the values you set, especially for date and time.
  • Security Levels: Be cautious when changing security levels as it can impact system access and security.

Conclusion

In this module, we covered advanced system configuration commands in CL. You learned how to retrieve and set system values, manage security settings, and optimize system performance. These commands are crucial for effective system management and ensuring your system runs smoothly. In the next module, we will explore interfacing with other systems, including calling external programs and using APIs.

© Copyright 2024. All rights reserved