View previous topic :: View next topic
|
Author |
Message |
scorp_rahul22 Currently Banned New User
Joined: 06 Aug 2007 Posts: 42 Location: chennai
|
|
|
|
Is there anf way to way to remove unwanted charcters from file.
EXAMPLE
INPUT
1DW3P.LKP.KBM
'DW4P.LKP.KBM'
#'DW5P.LKP.KBM'
!%#'DW6P.LKP.KBM'
*#'DW7P.LKP.KBM'
OUTPUT
DW3P.LKP.KBM
DW4P.LKP.KBM
DW5P.LKP.KBM
DW6P.LKP.KBM
DW7P.LKP.KBM
ACTUALLY STARTING POSITION IS NOT FIXED FOR THESE ENTERIES :- What i mean to say it not necessary that DW will start from 1 column only and any number of useless symbols can be there before actual name.
Can this be sort out using SORT utility. |
|
Back to top |
|
|
scorp_rahul22 Currently Banned New User
Joined: 06 Aug 2007 Posts: 42 Location: chennai
|
|
|
|
i try with normal sort utility nut i m not getting that desired result.
how wud i figure out while coding that alphabetic character has come |
|
Back to top |
|
|
scorp_rahul22 Currently Banned New User
Joined: 06 Aug 2007 Posts: 42 Location: chennai
|
|
|
|
so whats the solution for this ? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
scorp_rahul22 wrote: |
so whats the solution for this ? |
Have you referred your problem to the SYNCSORT technical support folks? I'm sure they could offer you a solution that will fit your needs. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you have DFSORT, you can use the PARSE function to do what you asked for like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1DW3P.LKP.KBM
'DW4P.LKP.KBM'
#'DW5P.LKP.KBM'
!%#'DW6P.LKP.KBM'
*#'DW7P.LKP.KBM'
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC PARSE=(%01=(STARTAT=C'D',FIXLEN=44,ENDBEFR=C'''')),
BUILD=(%01)
/*
|
|
|
Back to top |
|
|
|