UNSTRING statement

COBOL SORT statement with Examples

COBOL SORT files are common functionalities of COBOL applications. Sorting is required for sequential processing as the files need to be sorted in ascending/descending order. The COBOL SORT statement creates a sort file by executing input procedures or by transferring records from another file, sorts the records in the sort file on a set of

COBOL SORT statement with Examples Read More »

XML statement generation using SORT

We will generate XML statement from input records having fixed positions using SORT. We will use REMOVECC, HEADER1, BUILD, JFY, SHIFT, LEFT, LEAD, TRAIL, LENGTH, SQZ & TRAILER1 parameters. REMOVECC: The REMOVECC parameter generates reports that do not include ANSI carriage control characters that specify printer actions (for example, skipping a line or ejecting a

XML statement generation using SORT Read More »

Uppercase

SAVE discarded records using SORT

Record Selection for Output File can be done using STARTREC, ENDREC, INCLUDE/OMIT, SAVE Parameters. Use SAVE to include records for OUTFIL processing that have not been included in any other OUTFIL group. If SAVE is specified on more than one OUTFIL group, then each of these OUTFIL groups gets the records that were discarded from

SAVE discarded records using SORT Read More »

JOINKEYS File Match and Comparison

The JOINKEYS File Match utility help in comparing two files. JOINKEYS File Match operation is controlled by JOINKEYS, JOIN, and REFORMAT control statements. The SORTJNF1 and SORTJNF2, are the DD statements used to specify the files which will be used to perform the join operations. During JOIN operation on two files, each record from the

JOINKEYS File Match and Comparison Read More »

Uppercase

OUTFIL control statement in SORT JCL

The OUTFIL control statement describes the output file(s) and the processing to be done on the output records. OUTFIL processing is supported for sort, merge, and copy applications. Use the OUTFIL control statement to create multiple output files without making multiple passes through the input data. OUTFIL control statement Examples Example 1 The following example

OUTFIL control statement in SORT JCL Read More »

EVALUATE

Conditional Expressions use in COBOL

Conditional expressions identify conditions that are tested to enable the object program to select between alternate paths of control depending upon the truth value of the condition. Conditional expressions may be used in the EVALUATE, IF, PERFORM, and SEARCH statements. Conditional expressions have a value of “TRUE” or “FALSE”. Conditional expressions can either be simple

Conditional Expressions use in COBOL Read More »

EVALUATE

EVALUATE statement in COBOL Programs

EVALUATE statement is used for conditional processing which helps in eliminating a series of nested IF statements to test several conditions. The EVALUATE statement is very similar to the CASE construct common in many other programming languages. If none of the EVALUATE satisfies, by default the statements coded under WHEN OTHER will be executed and

EVALUATE statement in COBOL Programs Read More »

Scroll to Top