Home » SORT » SORT – OUTREC – TRAN

SORT – OUTREC – TRAN

SORT – OUTREC – TRAN

In SORT, you can make use of TRAN=keyword to do the following functions.

  1. 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 that your first char remains as upper case and the others are converted to lower case

OUTREC FIELDS=(1,1,2,5,TRAN=UTOL)

Here 2,5,TRAN=UTOL is of the format p,m,TRAN=UTOL.

  1. TRAN=LTOU translates lowercase letters (a-z) in a field to the equivalent uppercase letters (A-Z)
  1. TRAN=ETOA translates EBCDIC characters in a field to the equivalent ASCII characters.
  1. TRAN=ATOE translates ASCII characters in a field to the equivalent EBCDIC characters.
  1. TRAN=ALTSEQ translates characters in a field to other characters as specified by an ALTSEQ statement. For example, “null” characters (hex 00) can be changed to blank characters (hex 40)
  1. TRAN=HEX translates binary values in a field to their equivalent EBCDIC hexadecimal values (‘0′-‘F’). 2 output characters are produced for each input byte.
  1. TRAN=BIT translates binary values in a field to their equivalent EBCDIC bit values (‘0′ or ‘1’). 8 output characters are produced for each input byte.
  1. TRAN=UNHEX translates EBCDIC hexadecimal values (‘0′-‘F’) in a field to their equivalent binary values. An output byte is produced for each 2 input characters.
  1. TRAN=UNBIT translates EBCDIC bit values (‘0′ or ‘1’) in a field to their equivalent binary values. An output byte is produced for each 8 input characters.

 

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


About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s