Could you please help me to create a sort JCL for the below requirement. I am using 1.12 level of SORT.
I have a file of fixed record length 280. My file structure is like below
1. Emp Number starts from column 8 of length 5.
2. Name start from column 13 of length 30.
As per the design file should contain A - Z, 0 - 9, /, -, ^, & only in the name field
Other then those characters are considered as invalid for downstream processing.
INPUT FILE:-
----+----1----+----2----+----3----+----4----+-
***************************** Top of Data ****
00002015-06-25
00012322MRS NEHA PATIL2
00045633MRS VIJETA PATOLE
00078944MR KIRAN/PATIL1
00011155MR PARESH-THOMBARE
00022266MR PRAVEEN@DAWAN
00025677MR SUBHAS*YADAV2
99990000000006
**************************** Bottom of Data **
***************************** Top of Data ****
00002015-06-25
00012322MRS NEHA PATIL2
00045633MRS VIJETA PATOLE
00078944MR KIRAN/PATIL1
00011155MR PARESH-THOMBARE
00022266MR PRAVEEN@DAWAN
00025677MR SUBHAS*YADAV2
99990000000006
**************************** Bottom of Data **
So I want to create 2 files:-
1. First file should contain only those records having characters other then listed above (A - Z, 0 - 9, /, -, ^, &).
E.g. It should contain 2 employee record as there are characters * and @ in their name.
OUTPUT FILE1:-
----+----1----+----2----+----3----+----4----+-
***************************** Top of Data ****
00022266MR PRAVEEN@DAWAN
00025677MR SUBHAS*YADAV2
**************************** Bottom of Data **
***************************** Top of Data ****
00022266MR PRAVEEN@DAWAN
00025677MR SUBHAS*YADAV2
**************************** Bottom of Data **
OUTPUT FILE2:-
2. Second file should contain all the records from the input file and it should replace all other characters (other then valid one mentioned above)
with spaces.
E.g. In the file for employee 22266 names should be changed from PRAVEEN@DAWAN to PRAVEEN DAWAN and for employee 25677 name should be changed from SUBHAS*YADAV2 to SUBHAS YADAV2
----+----1----+----2----+----3----+----4----+-
***************************** Top of Data ****
00002015-06-25
00012322MRS NEHA PATIL2
00045633MRS VIJETA PATOLE
00078944MR KIRAN/PATIL1
00011155MR PARESH-THOMBARE
00022266MR PRAVEEN DAWAN
00025677MR SUBHAS YADAV2
99990000000006
**************************** Bottom of Data **
***************************** Top of Data ****
00002015-06-25
00012322MRS NEHA PATIL2
00045633MRS VIJETA PATOLE
00078944MR KIRAN/PATIL1
00011155MR PARESH-THOMBARE
00022266MR PRAVEEN DAWAN
00025677MR SUBHAS YADAV2
99990000000006
**************************** Bottom of Data **