Reformatting Records Using OUTREC - Part 1

You can create the reformatted OUTREC records in one of the following three ways using unedited, edited, or converted input fields (p,m for fixed fields, or %nn for parsed fields - see PARSE), and a variety of constants: . BUILD or FIELDS: Reformat each record by specifying all of its items one by one. Build gives you complete control over the items you want in your reformatted OUTREC records † INCLUDE/OMIT, INREC, OUTREC and OUTFIL Control Statements † The new DATE5 subparameter generates a date that includes microseconds in the form ''. † INREC, OUTREC and OUTFIL OUTREC Control Statements † The new VL subparameter allows you to create a variable-length field from justified or squeezed fields. JCL SORT or SYNCSORT utility in JCL is used to sort the datasets, merge datasets and copy datasets. Most of the installations change the SYNCSORT utility program name to SORT. JCL SORT Statement format: SORT FIELDS = (Starting position, Length, Format, Asc/Des, { Starting position, Length, Format, Asc/Des}{…..}) OR SORT FIELDS = (Starting position, Length, Asc/Des, { Starting… If you want a binary value to made readable , you can do so by converting it to an equivalent Zoned Decimal. OPTION COPY OUTREC FIELDS=(1,4,BI,TO=ZD) The TO=ZD parameter converts the 4 byte binary fields to its equivalent zoned decimal value in the output file. SORT – OUTREC – TRAN In SORT, you can make use of TRAN=keyword to do the following functions. TRAN=UTOL translates uppercase letter (A-Z) in the field to the equivalent lowercase letter (a-z). Input file: RAJESH SURESH RAMS SUNIL CHIRU Output File: Rajesh Suresh Rams Sunil Chiru OUTREC in the sort would look as below so…

[index] [9177] [3878] [30728] [2892] [9685] [25126] [14698] [25327] [1317] [21075]

Flag Counter