need to delimit by spaces



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

need to delimit by spaces

Postby goldvel » Wed May 27, 2009 4:54 pm

I have an input file which has first name and last name, which was seprated by spaces.

i need first name alone. (ie.. i need the all the characters till it encounters spaces.)

Example.

Input File:

David Smith
Fremid John

output file:

David
Fremid

Thanks,
Goldvel
goldvel
 
Posts: 1
Joined: Wed May 27, 2009 4:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to delimit by spaces

 

Re: need to delimit by spaces

Postby skolusu » Wed May 27, 2009 9:47 pm

goldvel,

use the following JCL
//STEP0100 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
DAVID SMITH                                             
FREMID JOHN                                             
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                         
  SORT FIELDS=COPY                                       
  INREC PARSE=(%00=(ENDBEFR=C' ',FIXLEN=20)),BUILD=(%00)
/*                                                       


The output will be a 20 byte firstname.
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post