You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

1 Días
1 Hrs
18 Min
48 Seg
Curso de COBOL desde Cero

Curso de COBOL desde Cero

Carlos Sánchez Botello

Carlos Sánchez Botello

Definiendo tu primer JCL

16/24
Resources

How to define and save a JCL?

Defining a Job Control Language (JCL) is an essential step for managing jobs on mainframe systems. This class will explain how to do it from scratch, from cutting and pasting existing content to completing a JCL to compile a simple program. While it may seem complex at first, once you understand the process, it will be a valuable skill for any mainframe programmer.

How to cut and paste in edit mode?

To begin with, it is important to understand how to handle the edit mode content of the system. The cut and paste action is fundamental to editing JCL files.

  1. Cut a block:

    • Locate the block of code you wish to cut.
    • Use CC at the beginning and end of the block to select it completely.
    • Use the cut command to move the block to the clipboard.
  2. Switch to edit mode and paste:

    • Launch edit mode to fully access the contents of the file.
    • Use d9 in the command column to delete all previous content.
    • Use the paste command to insert the lines you previously cut.

How to generate a new JCL for compilation?

Now that you have learned how to handle the content, the next step is to create a new JCL for the compilation of our Hello World program.

  1. Structure file creation:

    • Locate the first file and position in the command column.
    • Use c99, followed by the cre or create command to start a new file.
    • Name the file appropriately, such as JCLhola00HC for future reference.
  2. Define job parameters:

    • Inside edit mode, start with two diagonals followed by your user and the job definition.
    • Use the job statement followed by a description and execution parameters, such as Message Class, Message Level, and Notify.
  3. EXEC statement for compilation:

    • Defines the EXEC block, which executes the cobal procedure to compile the source code.
    • Specifies the datasets, both source(SRC) and load(LOAD).

What are the steps to execute the JCL?

At this point, you have successfully defined the JCL. Let's review the final steps for its execution.

  1. Completion and saving:
    • Close the current file with the completion line /, and be sure to save the changes using F3 or the save command.
  2. Upload and run the JCL:
    • Identify your job using its logical name in the spool.
    • Use the submit (sub) command to start the job.
    • The system will notify you of the success or failure of the job, mentioning a "code zero" as a success indicator.

Exploring and mastering JCL will not only allow you to run and compile programs in a mainframe environment with confidence, but will strengthen an essential part of your skills as a programmer. Don't hesitate to keep practicing and delving into this fascinating world - see you in the next class for more insights!

Contributions 4

Questions 5

Sort by:

Want to see more contributions, questions and answers from the community?

Este es el código usado en esta clase. Funcionó perfectamente con el submit .

Eso de hacerlo en view me paso en el IEFBR14 y me volvi loca, termine haciendo algo similiar… por inercia

ooops, me confundi toda, pense que ya habiamos compilado y ejecutado el programa (?)…okay igual sigo

**<u>Encabezado del JOB:</u>** **//HERC01HC JOB (COMP),** **//             'JOB COMPILA HOLA',** **//             CLASS=A,** **//             MSGCLASS=H,** **//             MSGLEVEL=(1,1),** **//             NOTIFY=HERC01,** **//             TIME=1440,** **//             REGION=8M** **//HERC01HC JOB (COMP),** **HERC01HC:** Es el nombre lógico del JOB. Con ese nombre se detecta en el SPOOL (Carrete). **JOB** Definición un nuevo JOB en el sistema JCL. **(COMP)** Se trata de un parámetro opcional conocido como "accounting information" o información de contabilidad. Este parámetro se utiliza para proporcionar información adicional sobre el JOB, como su propósito o el departamento que lo solicita.  **//             'JOB COMPILA HOLA',** Es un comentario que describe el JOB. No debe superar 20 caracteres. **//             CLASS=A,** Especifica la clase de trabajo. En este caso, se ha asignado la clase "A", que puede influir en la prioridad y la asignación de recursos del trabajo en un sistema mainframe. **//             MSGCLASS=H,** Indica al JCL que envié la salida a consola **//             MSGLEVEL=(1,1),** El parámetro MSGLEVEL en JCL se utiliza para controlar el nivel de detalle de los mensajes generados durante la ejecución de un JOB.  Este parámetro toma dos valores enteros separados por comas, donde el primer valor indica el nivel de mensajes que se mostrarán y el segundo valor indica el nivel de mensajes que se retendrán en el registro de trabajo. (1,1) es para mostrar todas las líneas. **//             NOTIFY=HERC01,** Indica a quién se enviarán las notificaciones cuando el trabajo se complete o si se producen errores. "HERC01" es el nombre del destinatario de las notificaciones. **//             TIME=1440,** Tiempo máximo que se permitirá para la ejecución del trabajo en minutos. En este caso, el trabajo tiene un tiempo máximo de 1440 minutos, es decir, 24 horas. **//             REGION=8M** Asigna una cantidad de memoria (8 megabytes) para la región de trabajo del trabajo. Esto afecta la cantidad de memoria disponible para el proceso de compilación. **<u>Compilación:</u>** **//COMPILE  EXEC COBOL,** **//         PROG='HOLA',** **//         PDSF='HERC01.PLATZI.SRC',** **//         PDSL='HERC01.PLATZI.LOAD'** **//COMPILE  EXEC COBOL,** **COMPILE:** Es el nombre del paso de trabajo. Este paso se utiliza para la compilación del programa COBOL. **EXEC COBOL:** Indica que se utilizará el procedure COBOL para llevar a cabo la compilación. Este procedure se definió en la configuración del entorno de desarrollo. Reside en la librería SYS2.PROCLIB **//         PROG='HOLA',** Especifica el nombre del programa COBOL a compilar. En este caso, se compilará un programa llamado "HOLA". **//         PDSF='HERC01.PLATZI.SRC',** **PDSF** se definió en el procedure COBOL.**** Indica la **ubicación de la biblioteca de código fuente COBOL**. Aquí se encuentra el código fuente del programa "HOLA".  **//         PDSL='HERC01.PLATZI.LOAD'** **PDSL** se definió en el procedure COBOL.**** Indica la ubicación donde se guardarán los resultados de la compilación, es decir, el módulo de carga o el programa compilado.