Page 1 of 1

Help in Soring Datasets

PostPosted: Thu Oct 07, 2010 9:27 pm
by cai_0715
Hi. Im new here. Hope someone could help me.

I want to create a JCL, that would delete duplicates. However, there are 2 conditions:

First validation would be, checking of duplicates for column 6 - 9.

Second, if column 6 - 9 is a duplicate, it would check if column 1 - 4 is greater than its duplicate line. If column 1 - 4 is lower, then it would be the line that would be deleted. Im new to JCL, so please bear with my explanation.

Sample:

Input would consist of

123456789
=========
111201010
111101010
111201012
111101011

Output:

123456789
=========
111201010
111101011
111201012

*line 2 would be deleted, since its column 6 - 9 has a duplicate of line 1 Also, its column 1 - 4 has a lower value (1111) compared to the column 1 - 4 (1112) of line 1.

Please, I would really appreciate any feedbacks. Thank you.

Re: Help in Soring Datasets

PostPosted: Thu Oct 07, 2010 10:08 pm
by NicC
First - JCL cannot do what you want. JCL is an 'interface' between your program and the operating system. It lets the operating system know what resources, files etc, your program needs.

I guess what you are looking for are the sort control cards for a sort solution to your problem in which case this should be posted in one of the sort sections. DO NOT REPOST - someone will move it to the correct place for you but you need to supply the sort product you are using - DFSORT, SYNCSORT, something else.