Categories: JCLMainframe

VLSCMP and VLSHRT use in VB file

VLSCMP and VLSHRT are the utilities used with VB files. In VB records always add 4 to the starting position. This is to account for the 4-byte RDW. For example, the following INCLUDE statement compares a PD field in the third through fifth data bytes of a VB record to a PD field in the sixth through eighth bytes of a VB record.
INCLUDE COND=(7,3,PD,EQ,10,3,PD)
If you know you have VB records with short compare fields, you can specify the VLSCMP option, if appropriate, to prevent DFSORT from terminating. For example:
OPTION COPY,VLSCMP
INCLUDE COND=(21,8,CH,EQ,C’Type 200′)
VLSCMP tells DFSORT that you want to temporarily replace any missing compare field bytes with binary zeros, thus allowing the short fields to be validly compared (the zeros are not kept for the output records). In this example, records less than 28 bytes are not included because the binary zeros added for the missing bytes in the field prevent it from being equal to ‘Type 200’. Another way you can prevent DFSORT from terminating for VB records with short compare fields, if appropriate, is by specifying the VLSHRT option. For example:
OPTION COPY,VLSHRT
INCLUDE COND=(21,8,CH,EQ,C’Type 200′)
VLSHRT tells DFSORT to treat any comparison involving a short field as false. In this example, any records less than 28 bytes are not included.
Note: When NOVLSCMP and NOVLSHRT are in effect, DFSORT terminates if it finds a short compare field in any VB record.

Read JCL blogs  : Click Here
SYNCSORT Manual :
Click Here
Admin

Share
Published by
Admin

Recent Posts

Optimize Outer Join Queries in the COBOL DB2 Program

Optimize Outer Join queries is a powerful tool for retrieving data from multiple tables. However,…

4 months ago

OUTER JOIN Queries: Common Errors and Resolutions

OUTER JOIN Queries are a valuable tool in SQL, allowing you to retrieve data from…

4 months ago

Impediments: Examples and Strategies for Scrum Masters

Mastering impediments is crucial to the Scrum Master's role in fostering a high-performing Scrum Team.…

4 months ago

Sprint Goal in Scrum with Examples

A Sprint Goal is a short, clear, and motivating target the Scrum Team aims to…

4 months ago

Context Switching – Measure and Avoid

Context switching refers to changing focus or shifting attention from one task or activity to…

5 months ago

Motivate People to Use Scrum – Strategies and Examples

Embracing change is never easy, especially when it involves a shift in work methodology. Motivate…

7 months ago