Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Discard Records with spaces.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

PostPosted: Wed Mar 22, 2006 8:52 pm    Post subject: Discard Records with spaces.
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 Moderator


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

PostPosted: Wed Mar 22, 2006 9:23 pm    Post subject:
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: Kentucky, USA

PostPosted: Wed Mar 22, 2006 9:49 pm    Post subject: Re: Discard Records with spaces.
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    Post subject: discard records with spaces
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    Post subject:
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 Moderator


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

PostPosted: Wed Mar 22, 2006 10:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us