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

Find Records with spaces between them


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

New User


Joined: 06 Feb 2007
Posts: 29
Location: Noida

PostPosted: Wed May 18, 2011 11:20 pm
Reply with quote

Hi,

I have a VSAM file which has a key of 33 and of the same length. I am reproing it into a Flat file of length 33 and want to find out if there are any records which have spaces between two words from the 12th position.

My input record looks like this
Code:

----+----1----+----2----+----3---
ABCDEJAMCIRMT JAMES
ABCDEJAMCIRMT-JAMES


My output file should have
Code:

ABCDEJAMCIRMT JAMES


The output file will have a length fixed length of 33.
Can somebody please let me know how to do it.

Thanks
Sudip[/code]
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 May 18, 2011 11:56 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=....  input file (FB/33)
//SORTOUT DD DSN=...  output file (FB/33)
//SYSIN DD *
  OPTION COPY
  RECORD TYPE=F
  INREC PARSE=(%=(ABSPOS=12,ENDAT=C' '),
               %1=(FIXLEN=1)),
    OVERLAY=(34:%1)
  OUTFIL INCLUDE=(34,1,CH,NE,C' '),BUILD=(1,33)
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top