Explain about CBL/PROCESS statement syntax



Explain about CBL/PROCESS statement syntax..

Answer / dimpy19

>>-+-CBL-----+--+--------------+-------------------------------><
'-PROCESS-' '-options-list-'
You can use CBL as a synonym for PROCESS.


options-list - A series of one or more compiler options, each one separated by a comma or a space.

**Compiler option can be set up in two way
1. JCL
2. COBOL Code

1. JCL - pass in PARM in EXEC statement

//MANGO1 EXEC PGM=IGYCRCTL,
// PARM='NUM,NODYN,APOST,NOSEQUENCE,NONAME,NOMDECK,LIST'

2. COBOL Code - PROCESS LIST,NOOFFSET

PROCESS LIST,NOOFFSET
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 VAR1 PIC 999 VALUE ZEROS.
01 VAR2 PIC 999 VALUE ZERO .
01 VAR3 PIC 999 VALUE ZEROS.
PROCEDURE DIVISION.
DISPLAY ' IN PROCEDURE DIVISION ' .
MOVE 12 TO VAR2.
MOVE 10 TO VAR3.
DIVIDE VAR1 INTO VAR2 GIVING VAR3.
DISPLAY ' VAR3 ' VAR3.
STOP RUN.



then go to sysout check message like below ---

The system detected a decimal-divide exception (System Completion Code=0CB).
From compile unit HELLO at entry point HELLO at compile unit offset +000001E2 at
address 25C001E2.

here offset +000001E2
take last 4 and check in compiler listing for the offset

000016: DIVIDE VAR1 INTO VAR2 GIVING VAR3.
0001D6 E902 D16C 80A0 000016 PKA 364(R13),160(3,R8)
0001DC E902 D15C 8098 000016 PKA 348(R13),152(3,R8)
0001E2 FD31 D178 D16A 000016 DP 376(4,R13),362(2,R13)
0001E8 F321 80A8 D178 000016 UNPK 168(3,R8),376(2,R13)
0001EE 96F0 80AA 000016 OI 170(,R8),X'F0'

now check line number 000016
000016** DIVIDE VAR1 INTO VAR2 GIVING VAR3.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

Hi, I have a requirement File A : I have 6 records out of which 4 are same. File B: I have 8 records out of 6 records are same. The 4 records in FILEA and 6 records in FILE B are same. If we substract we will get two records, I need these two records in output file This is because to remove the duplicates from the database. Through easytrieve we can compare but for that there should not duplicates, but in my file I have duplicates. Thanks in advance!!

2 Answers  


how to count the number of members in pds?

2 Answers  


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

0 Answers  


How to change default PROCLIB?

1 Answers  


what if any ,is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.

1 Answers  






What happens if both JOBLIB & STEPLIB is specified ?

0 Answers  


I have a dataset with record length 40 in production, due to some requirements it was changed to 80. Then how can we know the jobs which are effected by this change and how can we resolve it.

3 Answers   iGate,


What is DYNAMBR in jcl?

2 Answers   CTS,


What are isolation levels? Where do we need to specify them in compiling JCL?

3 Answers  


once we submitted the job to the operating system, how can we cancel the job before execution?

2 Answers  


oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records in both files copy all the common records into oza017.myorg.xyz dataset

3 Answers   Cognizant,


can a job be submitted through jcl only? is there another way to submit a job?

2 Answers   CSC,


Categories