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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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