Utilities And Some "Sort" of "Utilities" 😁

Jahnavi PuppalaJahnavi Puppala
2 min read

2nd WEEK

Hi everyone!!!!!! So, in this week I’ve learned these 2 things:-

  1. Utilities

  2. Sort Utilities

    So, let’s get started!!!!!!!!!!!!!!!!!!!!

  1. Utilities🐱‍🏍

    ✔ pre-written programs

    ✔ Maintains and Organize the data

♦IEFBR14: To delete or create a dataset

! To create a dataset: - DISP= (NEW, CATLG, DELETE)

! To delete a dataset: - DISP= (OLD, DELETE, DELETE)

♦IEBGENER: Copies dataset from 1 file to another without any condition

! No Condition—> SYSIN DUMMY

! Condition to copy—> SORT

♦IEBCOMPR: To compare data sets or PDS

! Must have same record length and format

! BLKSIZE can be different

♦IEBCOPY: Copy PDS to PDS

! COPY INDD= SYSUT1, OUTDD=SYSUT3

COPY INDD= SYSUT2, OUTDD=SYSUT3

! The COPY statement tells IEBCOPY to COPY the input data set to the

Output data set.

♦IDCAMS: Used to create, modify and delete the VSAM datasets.

We define one of these utilities in the EXEC statement, like: -

//STEP1 EXEC PGM= IEFBR14

  1. SORT Utilities🧩

    ✔Arranges the record in an order (either ascending or descending)

    ✔SORT can do both record sorting and file merging.

    Some of the SORT Utilities are as follows: -

    📌 SORT FIELDS: Copying the records from input file to output file.

    📌 SKIPREC=N: Skip over ‘n’ records in the input file before starting

    a sort or copy operations

    📌 STOPAFT=N: Stop after 5 records

    📌 INCLUDE: Used to select the records you want to include

    📌 OMIT: To eliminate a record from the dataset

    📌 INREC: Reformats the data before sorting the records.

    📌 OUTREC: Reformats the data after sorting the records.

    📌 OUTFIL: Used to create multiple output files based on conditions

    specified.

    📌 SUM: We use this in 2 different ways: -

    ♦ SUMFIELDS=NONE: Removes Duplicates.

    ♦ XSUM: To store the removed duplicates in diff. file.

    📌 REFORMAT: Tells the SORT utility, what fields to be written into output file

    from input file.

    📌 JOINKEYS: Used to compare 2 input files

    The JOINKEYS are further divided into 4 types: -

    ♦ INNER JOIN: Matching records from both the files

    ♦ LEFT-OUTER JOIN: Matching records from both + unmatched rec

    from file 1.

    ♦ RIGHT-OUTER JOIN: Matching records from both + unmatched rec

    from file 2.

    ♦ FULL OUTER JOIN: All records from file 1, file 2 (regardless of matching)

    📌 OVERLAY: Modifies specific positions in a record, while keeping the rest

    unchanged.

    📌 SORTIN: Input records.

    📌 SORTOUT: Output records.

0
Subscribe to my newsletter

Read articles from Jahnavi Puppala directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jahnavi Puppala
Jahnavi Puppala