Tags

, , , , , , ,

SORT – EDIT NUMERIC FIELDS (I,T,S)

  1. I indicate a leading insignificant digit to be displayed as 1-9, or as blank for a leading 0.
  1. T indicates a significant digit to be displayed as 0-9.
  1. S before the digits indicates a leading sign. S after the digits indicates a trailing sign. For M4, the leading sign is to be displayed as + for a positive value or as − for a negative value. For EDIT=(SI,III,III,IIT.TTT),SIGNS=(,−), the leading sign is to be displayed as blank for a positive value or as − for a negative value.
  1. Any other character (for example, comma, decimal point or hyphen) is just displayed as appropriate.

Suppose your input records are of the format


And your SORT OUTREC statement looks like below which is used to make your PD values meaningful:


The results out of your OUTREC statement are provided below:


You might also like to look at:

SORT – CONVERT PD to ZD and BI to ZD
SORT – EDIT FIRST AND LAST RECORD
SORT – EDIT MASK PATTERNS
SORT – EDIT NUMERIC FIELDS (I,T,S)
SORT – FINDREP, IFTHEN and INREC
SORT – How to use VB dataset (VLSHRT)
SORT – INCLUDE and OMIT
SORT – INREC, INCLUDE and OMIT
SORT – JUSTIFY, SQUEEZE and OVERLAY
SORT – LOOKUP AND CHANGE
SORT – OUTPUT DATASET DCB (LRECL,RECFM,BLKSIZE)
SORT – OUTREC – INSERT ZEROES, BLANKS, STRINGS
SORT – OUTREC – TRAN
SORT – PARSE – REFORMAT VARIABLE FIELDS
SORT – Process Order of CONTROL Statements
SORT – REMOVE DUPLICATES AND WRITE THEM TO XSUM
SORT – SET RETURN CODE ‘04’ IF OUTPUT FILE IS EMPTY
SORT – SKIPREC and STOPAFT
SORT – SUM FIELDS
SORT – TO REPLACE A CHAR WITH ANOTHER CHAR – ALTSEQ
SORT – INREC
SORT – SYMBOLS
SORT JOB – SIMPLE COPY
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
SORT JOIN – UNPAIRED RECORDS INDICATOR


Advertisements