Hi Team,
I am in process of creating SORT CARD with Omit condition based on the Number of Inputs/Input. Typically 'OR' should be added at the end when there is more than one input .
I am in process of rearrange my statements on built in cards . Any help is very much appreciated . I saw few samples from our forum but it has dummy records added at the beginning and the end to have logical begin and end of sort card .
Why don’t you use JOINKEYS instead of having too many ORs which is sort of redundant ?
In your SORT CARD you don’t need OMIT COND in HEADER1, just BUILD it for first record only and if you don’t want spaces the SQZ it or don’t add it during the BUILD.
//*============================================
//* SELECT DATA ON VALIDITY LIST
//*============================================
//SORTJOIN EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//*
//VALIDATE DD *
09999
08888
//*
//MASTER DD *
01111 garbage data
08888 good data
07777 garbage data
05555 garbage data
08888 good data
09999 good data
03333 garbage data
00000 garbage data
02222 garbage data
01111 garbage data
09999 good data
03333 garbage data
04444 garbage data
//*
//SORTOUT DD SYSOUT=*
//*
//SYSIN DD *
JOINKEYS F1=MASTER,
FIELDS=(1,5,A)
JOINKEYS F2=VALIDATE,
FIELDS=(1,5,A)
*
REFORMAT FIELDS=(F1:1,80)
*
SORT FIELDS=COPY
*
END
//*
Code:
********************************* TOP OF DATA *****
08888 good data
08888 good data
09999 good data
09999 good data
******************************** BOTTOM OF DATA ***
balaji81_k, Why are you still struggling creating the dynamic SORT card? I am mean you can always learn this way and you can continue to do that but right away solution is to use JOINKEYs as illustrated to solve the problem in hand.
The JOINKEYs solution is already dynamic in nature .
balaji81_k, Why are you still struggling creating the dynamic SORT card? I am mean you can always learn this way and you can continue to do that but right away solution is to use JOINKEYs as illustrated to solve the problem in hand.
The JOINKEYs solution is already dynamic in nature .
balaji81_k, Why are you still struggling creating the dynamic SORT card? I am mean you can always learn this way and you can continue to do that but right away solution is to use JOINKEYs as illustrated to solve the problem in hand.
The JOINKEYs solution is already dynamic in nature .
Hi Rohit,
Thanks for your valuable time and provide me an example, i come up with simple sort build which has Header and Trailer records with 'Begin' and 'End' and required records is in the body of Omit Condition.