Welcome to the Mainframe Natural Training Project
This is a program developed in Natural, a programming language for mainframe environments. The program allows users to select and modify data from a company table (AOCUCOTU
), using two interactive maps and simulated transactions.
The goal of the program is to enable users to:
- Select a record from the
AOCUCOTU
table (companies) in ascending or descending order. - View the details of the selected record.
- Modify specific fields of the record and simulate updates using a backout transaction (no real changes are made to the database).
Here are the main features of the program:
- Users can choose between ascending (
A
) or descending (D
) order to display records. - If no order is selected, the first 5 records are displayed by default.
- Map 1 (
SGCM0108
): Allows users to select a record by marking it with anX
. - Map 2 (
SGCM108B
): Displays the details of the selected record and allows users to modify specific fields (CCOA
,GREC-CCO
,IPRC-CCO
).
- Uses a backout transaction to simulate updates without making real changes to the database.
- After simulating an update, a confirmation message is displayed.
- Validates user input (e.g., ensures only one record is selected, checks for valid order selection).
- Displays error messages for invalid inputs or actions.
- Start the program: The first map (
SGCM0108
) is displayed. - Select an order: Choose between ascending (
A
) or descending (D
) order, or press Enter to display the first 5 records. - Select a record: Mark a record with an
X
and press Enter to view its details on the second map (SGCM108B
). - Modify fields: Update the fields (
CCOA
,GREC-CCO
,IPRC-CCO
) as needed. - Simulate an update: Press
PF4
to simulate the update and see a confirmation message. - Exit: Press
PF3
at any time to exit the program.
- Environment: Mainframe with Natural programming language support.
- Resources: The program is designed to run in a terminal-based mainframe environment.
- Main Logic: The program is structured into subroutines for handling each map and performing actions like record selection, validation, and simulated updates.
- Maps:
SGCM0108
: For record selection.SGCM108B
: For displaying and modifying record details.
- Variables: Key variables include
CCOK
(company code),CCOA
(company name),GREC-CCO
(group code), andIPRC-CCO
(priority code).
- Developed by: Sergio Gracia Correia.
- Purpose: This project was created as part of a training program to demonstrate skills in Natural programming and mainframe environment interaction.
- Inspiration: The program showcases how to handle user input, simulate transactions, and interact with databases in a mainframe environment.