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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm

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