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:

0 Días
3 Hrs
24 Min
4 Seg
Curso Práctico de COBOL

Curso Práctico de COBOL

Carlos Sánchez Botello

Carlos Sánchez Botello

Ejecución de programa

8/10
Resources

How to execute a program using JCL?

The JCL, or Job Control Language, is essential for programming in mainframe environments. In this context, you will learn how to run a program with the help of a JCL that you have previously generated. To do this, you start the command window and type top to move to the beginning of the JCL. It is important to know the essential parts of a JOB statement, which include crucial parameters such as the memory to be used and the maximum time of the JOB.

What is included in a JCL?

Throughout the JCL, you will see several important steps that we break down below:

  1. JOB statement: always starts with this statement, which defines the usable memory and other parameters.
  2. Compilation step: It refers to the procedure or program loaded during the environment configuration:
    //JobJobName JOB ...,// PGM=program_name
  3. IFBR14 Utility: Configuration to manage files, allowing to delete and generate new ones:
    IFBR14, ..., DELETE FILE
  4. IEBGENER utility: Conditionally backs up files according to the result of previous steps:
    //Use of conditional: IF STEP02 LE 9 THEN

How to add data to an input file?

This is done by accessing the generated files, usually in edit mode. Here you enter data such as the student's name, GPA, and an indicator that determines whether he/she receives a scholarship:

  • Scholarship indicator: '1' for scholarship recipient, '0' for non-scholarship recipient.
  • Scholarship Amount: fill in all nine digits of this field if on scholarship.

Example entry:

Jose Ganimedes Montes 85 1 0236800Jimena Hernandez Gonzalez 72 0 0000000.

What happens after I submit a JCL?

After you submit(su) the JCL, you will be able to check its execution in the spool. In case of error during execution, it is useful to check the job display console(st repo) to identify problems, such as incorrect spaces in statements.

Common errors:

  • Incorrect spaces: Between data and parameter definitions, affect JCL loading.
  • Empty input files: Make sure to handle exceptions correctly to avoid critical failures.

How to verify the output of the execution?

The output and correct functioning of your JCL is confirmed in the generated report, where the information is verified:

  • Totals read and printed: Of the number of students processed.
  • Total amount of scholarships: Only adds up for those indicated as scholarship recipients.

Use this information to check if your JCL is processing the files correctly. Running the JCL with an empty file is a robust practice to check that it will not throw unexpected errors when encountering non-existent data, which must be properly managed.

What should be considered when modifying an existing JCL?

It is common that you need to adjust file names or conditions between runs. Be sure to modify the names and conditions correctly in all steps:

  • Updates in files: Modify both the input and output referenced in different steps.
  • Proper conditions: When working with different files, keep the conditional logic consistent.

With these techniques and examples, you will continue to expand your skills in using JCL on mainframes, opening up a universe of programming possibilities. I encourage you to continue exploring the world of mainframes, where every session is an opportunity to strengthen your knowledge and skills. Go for more!

Contributions 4

Questions 5

Sort by:

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

Casi me saco un ojo buscando un error.

38 REPORT01 PASO04 PGMUNIVE AB S0C7

El error fue al editar el archivo de herco1.alumnos.becas me comi un cero en el valor de la beca.

lo agregue y funciono.

Cuando se está trabajando con la versiío Hyperion de Hercules, la UNIT es 3390. De esa manera funciona el proyecto.
Como varios de los que han comentado y, muy seguramente, varios que no quisieron comentar, es muy probable que te encuentres con errores de sintaxis al momento de ejecutar el job al final. En mi caso particular tuve tanto errores en el código de Cobol como en el mismo JCL, facil perdi como 6 horas en arreglar esto jeje. Primero les puedo decir que los códigos en los archivos de clase si están bien (por si tienen dudas), solo que el JCLPGMU tiene algunas cosas cambiadas en los comentarios comparado con lo visto en los videos. Por otra parte si están muy desesperados recomiendo ampliamente comparar los codigos del profe con programas que cumplan ese fin como Beyond Compare o el mismo chatgpt, ya que en ocasiones los códigos de error no son para nada claros, si quieren hacerlo de forma manual para practicar el ojo como uno, pueden abrir su código y el de muestra en doble ventana . Un ultimo detalle, si quieren copiar un código externo a la consola simulada tomen en cuenta que máximo pueden copiar 3 lineas (o al menos ese fue mi caso). y puede que aparezcan lineas en blanco que tendrán que borrar. La verdad es mas rápido simplemente pasar el archivo de texto a la carpeta como nos enseña en el curso. Mucha suerte a los que sigan buscando su error y que compilen todo con exito
NO LLENA AUTOMATICAMENTE EL NUMERO DE REGISTRO DEL CUAL SE TRATA (MINUTO 6:06) ![](https://static.platzi.com/media/user_upload/image-4aecb272-82d0-40e0-ab77-87a7f5a34a08.jpg)