IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Discard Records with spaces.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Atlanta, (USA)

PostPosted: Wed Mar 22, 2006 8:52 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 22, 2006 9:23 pm
Reply with quote

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
View user's profile Send private message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Atlanta, (USA)

PostPosted: Wed Mar 22, 2006 9:49 pm
Reply with quote

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
View user's profile Send private message
vishal_a

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Wed Mar 22, 2006 9:54 pm
Reply with quote

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
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Wed Mar 22, 2006 9:58 pm
Reply with quote

hi muffirulz,


option=copy,

omit cond=(1,7,ch,eq,c' ')


thak's
thanooz.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 22, 2006 10:10 pm
Reply with quote

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
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Discard record with 0 entry if Dup... SYNCSORT 7
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
Search our Forums:


Back to Top