SORTING problem with file



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

SORTING problem with file

Postby kavitasahu » Thu Apr 23, 2015 7:50 pm

Hi Team,
I have a requirement where in the flat file one of the records is having junk character.

My file structure is like below

1. Customer Number start from column 10 of length 10.
2. Customer Name start from column 20 of length 30.

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
     00002872641774MR AADESH SHRIVAS
     00002713415786MR AJAY KHAN
     00002813516868MR SAMáS ó MIRZA
     00002136168774MR VIJAY SHAH



Problem area here is the Customer name field which is creating problem to the downstream system. As it can be seen that there is junk character in the
Field. So I want to create 2 file here:-

1. First file will have all records excluding problematic record. So it can be passed to downstream system for further processing. So it should contain
below data only:-

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
     00002872641774MR AADESH SHRIVAS
     00002713415786MR AJAY KHAN
     00002136168774MR VIJAY SHAH


2. Second file will have customer number only (which start from column 10 of length 10) which is having invalid character, so I can pass that
customer number back to business informing about the problem. So it should contain below data only:-

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
2813516868



Using below SORT JCL I am able to overlay those junk value with spaces, but that is not my requirement.

OPTION COPY
ALTSEQ CODE=(6B40,7F40,7DF0)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(20:20,30,TRAN=ALTSEQ))


I hope my requirement is clear. Please help me to create SORT jcl for my above requirement and let me know if any other details are required.
kavitasahu
 
Posts: 11
Joined: Wed Feb 19, 2014 12:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORTING problem with file

 

Re: SORTING problem with file

Postby prino » Thu Apr 23, 2015 9:36 pm

And why are accented characters considered "junk"? My sister is called Desirée, and the é is most definitely not a junk character. You don't have any problem sorting the file, you have a much bigger problem with your back-end systems...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: SORTING problem with file

Postby Terry Heinze » Thu Apr 23, 2015 9:53 pm

kavitasahu,
In the future, please use Code tags for readability.
.... Terry
Terry Heinze
 
Posts: 193
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: SORTING problem with file

Postby NicC » Thu Apr 23, 2015 10:38 pm

Topic has been coded and moved to the correct part of the forum (assuming DFSort is the sort product in question).

kavitasahu, you are asking a sort question, not a JCL question. In future please ensure that you post in the correct part of a foum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: SORTING problem with file

Postby kavitasahu » Fri Apr 24, 2015 1:02 pm

Hi Prino,
I have just given it as an example. There are couple of character in the name field ( like ' and " , business is going to give me the list of invalid characters, So I will add them like CODE=(6B40,7F40,7DF0)). So I just want to have a check for those and wanted to create 2 files as stated above. Hope my requirement is clear. So could you please help me to create sort jcl for the same.

Thanks
Kavita
kavitasahu
 
Posts: 11
Joined: Wed Feb 19, 2014 12:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORTING problem with file

Postby NicC » Fri Apr 24, 2015 1:38 pm

The JCL is easy but what you are wanting help with is the sort control cards.
The correct approach is to fix the program producing the incorrect dataset.
I will leave it to the sort wizards to help with the control cards.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: SORTING problem with file

Postby BillyBoyo » Fri Apr 24, 2015 2:18 pm

I'm with Prino. I'm prepared to bet a considerable sum, up to two cents Euro, that the "junk" is far from junk.

Can you run this, and post the the full sysout from the step, so we can see the level of SORT that you have, as it will affect what code you are able to use?
//S1 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
content does not matter
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SORTING problem with file

Postby kavitasahu » Fri Apr 24, 2015 3:49 pm

Thanks Billy for looking into this. I submitted the JCL and getting following in SYSOUT. Please let me know if any other details are required.

RECORD TYPE IS F - DATA STARTS IN POSITION 1
C5-I12416 C6-K90026 C7-K94453 C8-K94453 C9-BASE E5-K80744 E7-I12416
BLOCKSET COPY TECHNIQUE SELECTED
VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
- CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 11:07 ON FRI APR 24, 20
OPTION COPY
ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
PARMLIB OPTIONS WERE MERGED WITH INSTALLATION MODULE DEFAULTS
TTDVACT1.STEP0010. , INPUT LRECL = 243, BLKSIZE = 27945, TYPE = FB
MAIN STORAGE = (MAX,6291456,6291456)
MAIN STORAGE ABOVE 16MB = (6234096,6234096)
OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,
OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,
OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALO
OPTIONS: RESALL=16384,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,COBEX
OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=N,DSA=0
OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=W,PARM
OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=50 ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSI
OPTIONS: NULLOUT=RC0
OPTIONS: DYNAPCT=10 ,MOWRK=Y
EXCP ACCESS METHOD USED FOR SORTOUT
EXCP ACCESS METHOD USED FOR SORTIN
F4-BASE F5-BASE E8-I12416
OUTPUT LRECL = 243, BLKSIZE = 27945, TYPE = FB
kavitasahu
 
Posts: 11
Joined: Wed Feb 19, 2014 12:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORTING problem with file

Postby BillyBoyo » Fri Apr 24, 2015 4:34 pm

OK, thanks. You have 1.12, so you can't use alphanumeric tests available in 2.1.

A simple COPY then, with two OUTFIL statments. One which uses OMIT=(20,20,SS,EQ,X'xx,xx,xx,xx') where each xx is the hexadecimal value you want to avoid. The second OUTFIL has SAVE, so it will get all those not selected in the first OUTFIL, and use BUILD for your reference number list.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SORTING problem with file

Postby kavitasahu » Wed Apr 29, 2015 4:37 pm

I ran the jcl using following SYSIN card but it is giving below error. However below SYSIN is working fine if I am
searching for any text instead of special character using OMIT=(49,30,SS,EQ,C'ALAN'). It looks its creating prolem to identify
special chracters.

//SYSIN     DD    *                                                 
 OPTION COPY                                                       
 OUTFIL FNAMES=MAINFILE,OMIT=(49,30,SS,EQ,X'6B40,7F40,7DF0,BE40)   
 OUTFIL FNAMES=RESTFILE,SAVE,BUILD=(01:15,10)                       
/*   


Error Message:-

ICE805I 1 JOBNAME: TTDVACT1 , STEPNAME: STEP0010                           
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                 
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                             
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 12:03 ON WE
           OPTION COPY                                                     
           OUTFIL FNAMES=MAINFILE,OMIT=(49,30,SS,EQ,X'6B40,7F40,7DF0,BE40) 
                                                          £                 
ICE113A E COMPARISON FIELD ERROR                                           
           OUTFIL FNAMES=RESTFILE,SAVE,BUILD=(01:15,10)                     
ICE751I 0 C5-I12416 C6-K90026 C7-K94453 C8-K94453 E7-I12416                 
ICE052I 3 END OF DFSORT
kavitasahu
 
Posts: 11
Joined: Wed Feb 19, 2014 12:11 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post