SYNCSORT "readability"

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
Sayton
Member
Posts: 10
Joined: Tue May 05, 2009 6:52 pm

SYNCSORT "readability"

Post by Sayton » Thu Jun 11, 2009 9:07 pm

Hi....

In order to increase "readability in SYNCSORT parameters, does anyone know if SYNCSORT (not DFSORT etc.) supports some form of "EQUATE" (or similar) to allow something like the following (but not just in OUTREC processing) -

Native SYNCSORT version
OUTREC IFTHEN=(WHEN=(05,5,CH,EQ,C'3B300',AND,
13,2,CH,EQ,C'04'),
OVERLAY=(30:C'01500',
57:C'0225',
65:C'0120')),
Desired version
EQUATE RECCODE 5,5
EQUATE RECTYPE 13,2
EQUATE MAXH 30
EQUATE MAXD 57
EQUATE MAXW 65

OUTREC IFTHEN=(WHEN=(RECCODE,CH,EQ,C'3B300',AND,
RECTYPE,CH,EQ,C'04'),
OVERLAY=(MAXH:C'01500',
MAXD:C'0225',
MAXW:C'0120')),
The only stupid question is the one you DON'T ask!

User avatar
arcvns
Member
Posts: 28
Joined: Sat May 30, 2009 10:19 pm
Location: Chennai, India

Post by arcvns » Thu Jun 11, 2009 9:53 pm

Sayton,

Is this a business requirement?
(but not just in OUTREC processing)
And what did you mean by this?
Arun

Sayton
Member
Posts: 10
Joined: Tue May 05, 2009 6:52 pm

Post by Sayton » Fri Jun 12, 2009 6:28 pm

Hi guys - I discovered the answer for myself (now there's a rarity!) :shock:

SYNCSORT supports DFSORT's SYMNAMES DD (and SYMNOUT too).

Basically, create the SYMNAMES file (I used FB/80/27920) and put in it entries like
*
** Comments start with an asterisk in col 1, or can be placed after
** parameters providing that at least one blank precedes them
*
RecType,4,6,CH Record type (offset 4, 6 chars)
RecCode,*,4,CH Record code (follows Record type)
*
** You can specify values too!
*
MastRec,C'100000' Master record is the 100000
etc.

If you include the DD SYMNAMES in the SYNCSORT JCL, in the sort parameters you can then use constructs like -
SORT FIELDS=(RecType,A,RecCode,D)
and
INCLUDE=(RecType,EQ,MastRec)

Including the DD SYMNOUT (optional) causes SYNCSORT to write a "report" of the interpretation of the symbolic names.

One small thing to remember - SYMNAMES entries are CaSe sensitive.
"Rectype" is NOT the same as "RecType" (as I discovered in testing!) :oops:

Hoping this helps someone else....
The only stupid question is the one you DON'T ask!

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others