Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


Copy record when a particular string is present in it

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
Captain Nero
Member


Joined: 20 Jun 2008
Posts: 10
Location: Kolkata, India

PostPosted: Thu Sep 04, 2008 2:58 pm    Post subject: Copy record when a particular string is present in it Reply with quote

Hi,

I have a FB file of LRECL 80. There is a particular string 'ABCD' which can occur at any position starting form 1 to 77 in some the records. The others bytes may have different random values.

My requirement is to copy the records which has that particular string. I could have used a 77 INCLUDE statements one after another, but looking some better way of doing it.

The input file is like -

ABLKJDFLKSDJLFJABCD1GDFKSG7
ABCDOIHFOAIFHONCEWU1924932
OIEDHOWEFOINC12938443BCOBE
LAHFABCDPOWJEFPOWTRUTUERPU

Output file should be -

ABLKJDFLKSDJLFJABCD1GDFKSG7
ABCDOIHFOAIFHONCEWU1924932
LAHFABCDPOWJEFPOWTRUTUERPU

Can you please help me with it.
_________________
Regards,
Captain N.
Back to top
View user's profile Send private message

Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 487
Location: San Jose, CA

PostPosted: Thu Sep 04, 2008 8:04 pm    Post subject: Reply with quote

You can use DFSORT's substring search function like this:

Code:

  OPTION COPY                       
  INCLUDE COND=(1,80,SS,EQ,C'ABCD') 

_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts compare 2 files with different LRECL 11 nina 4106 Wed Mar 18, 2009 1:58 pm
ksk View latest post
No new posts Copy records for matching key appearing at different places. 4 rangab 1666 Tue Feb 03, 2009 11:36 pm
rangab View latest post
No new posts Different forms of Case -when (loop handling) in Eazytrieve 2 Avani 4336 Thu Apr 05, 2007 8:25 pm
Veera View latest post
No new posts Reg: Different operating systems in mainframes 1 156138 2241 Wed Sep 20, 2006 12:21 pm
Krishna View latest post
No new posts What are all the COBOL compilers available? 4 Sweetu 5811 Fri Aug 25, 2006 12:59 pm
agkshirsagar View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB