Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 a string in PS file opened in br... mukkas CLIST & REXX 2 Sat Feb 24, 2018 2:15 pm
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us