View previous topic :: View next topic
|
Author |
Message |
muffirulz
New User
Joined: 14 Sep 2005 Posts: 74 Location: Atlanta, (USA)
|
|
|
|
Hi
I have a file tracking ids of length x(13). this file contains spaces in between ids. I would like to sort the records to another file eliminating all the records with spaces. Please help me out in this.
Thnx |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
It's not clear what you want to do. Please show an example of your input records and what you want for output. You can use a b to represent each blank if that will make it clearer. |
|
Back to top |
|
|
muffirulz
New User
Joined: 14 Sep 2005 Posts: 74 Location: Atlanta, (USA)
|
|
|
|
Hi Frank,
Here is an example
Input File A
1234669
2358965
1523698
1758963
1258935
1452368
Output File B
1234669
2358965
1523698
1758963
1258935
1452368
I just have to eliminate the rows with spaces from file A and write records in File B |
|
Back to top |
|
|
vishal_a
New User
Joined: 24 May 2005 Posts: 45 Location: Noida
|
|
|
|
Hi ,
We can use omit cond for the same to remove the spaces .
Another way is to do with fileaid 3.3 option. There when copying to another dataset use Quick option and provide the starting position and length of field .for ex
1 , 7 ne ' '
this will copy all the records where there will be no spaces.
Correct me if i m wrong.
thanks |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
hi muffirulz,
option=copy,
omit cond=(1,7,ch,eq,c' ')
thak's
thanooz. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use the following DFSORT job to do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OMIT COND=(1,7,CH,EQ,C' ')
/*
|
|
|
Back to top |
|
|
|