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
 
Retrieve rows which has a certain record in any field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mbalaji2585
Warnings : 1

New User


Joined: 10 Nov 2006
Posts: 11
Location: mumbai

PostPosted: Wed Aug 01, 2007 1:23 pm    Post subject: Retrieve rows which has a certain record in any field
Reply with quote

Hi,
I want to search the file for a certain record like 'e5010' which can be in any field say 5 to 9 or 13 to 17, etc........ of the input file.

When the record is present in a row, I want that particular row to be copied into another output file.

Is it possible to do it in a JCL. If so , can anyone give some idea regarding the same.

Thanks,
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Aug 01, 2007 2:40 pm    Post subject:
Reply with quote

Balaji,

Quote:
I want to search the file for a certain record like 'e5010' which can be in any field say 5 to 9 or 13 to 17, etc........ of the input file.


Quote:
I want that particular row to be copied into another output file.


Let me rephrase your requirement. You need to copy a fields if the string 'E5010' is present in the IP record. Correct me if I had understood wrongly.

If I got your requirement properly, use the following SORT technique -

Code:
//SYSIN DD *
  INCLUDE COND=(1,80,SS,EQ,C'E5010')
  SORT FIELDS=COPY
  OUTREC FIELDS=(1,10)
/*


Assumptions made:
(1) Your IP file is 80 in length
(2) You wanted to copy first 10 bytes to OP file
Back to top
View user's profile Send private message
mbalaji2585
Warnings : 1

New User


Joined: 10 Nov 2006
Posts: 11
Location: mumbai

PostPosted: Wed Aug 01, 2007 4:14 pm    Post subject: Re: Retrieve rows which has a certain record in any field
Reply with quote

Hi ,
Thanks every one. I got the result by using your JCL. Actually istead of using SS in
INCLUDE COND=(1,2048,SS,EQ,C'E5010')

I was trying CH.

Can you tell me wahat this SS means.

Thanks once again to all.
Back to top
View user's profile Send private message
mbalaji2585
Warnings : 1

New User


Joined: 10 Nov 2006
Posts: 11
Location: mumbai

PostPosted: Wed Aug 01, 2007 4:18 pm    Post subject: Re: Retrieve rows which has a certain record in any field
Reply with quote

Hi rajesh,

can you share with the case of doing this using binary or linear search which you told.
Actually my file length is 2048.

Thanks,
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 Aug 01, 2007 10:22 pm    Post subject:
Reply with quote

Quote:
Can you tell me wahat this SS means.


SS means substring search. For more information, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/3.7.4?SHELF=EZ2ZO10I&DT=20060615185603
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
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 Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts CICS RETRIEVE pshongal CICS 2 Thu Mar 08, 2018 9:15 am

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