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
 

 

Find Records with spaces between them

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Find Records with spaces between them
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 Moderator


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

PostPosted: Wed May 18, 2011 11:56 pm    Post subject:
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    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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
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


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