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
- System Values: Parameters that control the behavior of the system.
- Configuration Commands: Commands used to set and retrieve system values.
- Security Settings: Commands to manage system security configurations.
- 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.
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.
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.
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
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.
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.
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.
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.
Explanation:
DSPPFRDTA
: Displays performance data for the system.
Practical Exercises
Exercise 1: Retrieve and Display System Date
- Retrieve the system date and store it in a variable.
- 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
- Change the system time to
14:30:00
. - Verify the change by displaying the system time.
Exercise 3: Set Security Level
- Change the security level to
30
. - Display the current security settings.
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.
CL (Control Language) Course
Module 1: Introduction to CL
- What is Control Language?
- Setting Up Your Environment
- Basic Syntax and Structure
- Writing Your First CL Program
Module 2: Basic CL Commands
- Introduction to CL Commands
- File Management Commands
- Job Management Commands
- System Management Commands
Module 3: Variables and Expressions
Module 4: Control Structures
Module 5: Advanced CL Commands
- Advanced File Operations
- Advanced Job Scheduling
- System Configuration Commands
- Security and Permissions