Pages

Wednesday, February 4, 2015

SYNCSORT Advanced Features

Many use SYNCSORT for sorting files. But SYNCSORT can do a lot more. It can be used to format records. Because of this feature, it can be used for other purposes. (These features are also available in DFSORT, although some features work differently in DFSORT).


I have written an automated migration process based solely on SYNCSORT. What the process does is it reads a list of Configuration items or CI's (ie. JCL, PROC, Datalib, source, etc) and generates JCL to migrate these configuration items.

It can also update this list in the end, indicating which environment the CI is in and what date it was migrated. It also keeps a log as to who migrated this and when.

Some useful SYNCSORT Advanced Functions

  1. SYNCSORT has an IFTHEN function that allows you to generate specific output formats based on specific criteria in the input record. With this, you can say, generate a compile JCL if the CI read is a source or generate an IEBCOPY job if the CI is a JCL or PROC.
  2. SYNCSORT can translate strings. You can specify the input string and the resulting output string using the FINDREP command.
  3. SYNCSORT can parse inputs allowing you to specify your SORTIN as NAME=PGMNAME,PDS=SOURCE.LIB. With the PARSE command you do not need to put your fields in specific columns, but you can type them up as shown.
  4. SYNCSORT can use synonyms to make your control cards readable. If you have a statement like SORT FIELDS=(1,10,CH,A), you can change it so that the statement can look something like: SORT FIELDS=(NAME,CH,A) by using synonyms. To do this, you specify the synonyms in the SYMNAMES DD name.
Basically, I used these features to write my automated migration process. If you would like to know more about this process, feel free to comment on this post and I will respond to you.

1 comment:

Total Pageviews