Search for a string using SORT #2

To Search for a particular string within a file when the exact position
of that string within a record is not known and to write that record in
the Output file the following SORT card can be used.

Example 1:
SORT FIELDS=COPY
INCLUDE COND= (1, 80, SS, EQ, C'FIND STRING')

Here,

SS - Sub string,
1 - Starting position of the range
80 - Width of the search range
EQ - Comparison operators

The Sort card for this will need information like range of columns
within which you want the search to be performed. To search in the
whole file you can give the start position as 1 and LRECL of the file
as the width of the search range as done above. We can also replace the
'EQ' parameter by 'NE' which will fetch us all the records which don't
have the specified string. Only EQ & NE can be used for comparison. We
can even use OMIT COND instead of INCLUDE.

This can also be used to find the records with string that match one of
the strings in the COND.

Example 2:
SORT FIELDS=COPY
INCLUDE COND= (1, 80, SS, EQ, C'HDR,TRL')

The above sort card returns all records with the substring ' HDR' or
'TRL' occurring within the search range(1-80) of the record in the
input file. 
 
Thanks,
MFTIPS
http://mftips.blogspot.com/

0
mftips (9)
2/8/2006 2:32:03 AM
comp.lang.cobol 4236 articles. 0 followers. Post Follow

6 Replies
645 Views

Similar Articles

[PageSpeed] 42
mftips@gmail.com wrote:
> To Search for a particular string within a file when the exact position
> of that string within a record is not known and to write that record in
> the Output file the following SORT card can be used.
>...

Your examples are actually incorrect.  Your control statements contain
blanks that will result in syntax errors.  For example 1, the INCLUDE
statement should be:

   INCLUDE COND=(1,80,SS,EQ,C'FIND STRING')

Your second example does NOT do what you say it does.

   INCLUDE COND=(1,80,SS,EQ,C'HDR,TRL')

will actually include records with the string 'HDR,TRL' in them.  To
include records with the string 'HDR' or the string 'TRL' in them, you
would use this DFSORT INCLUDE statement:

   INCLUDE COND=(1,80,SS,EQ,C'HDR',OR,
                1,80,SS,EQ,C'TRL')

To include records with the string 'HDR' or the string 'TRL' in
positions 11-13, you could use this DFSORT INCLUDE statement:

   INCLUDE COND=(11,3,SS,EQ,C'HDR,TRL')

For those who are not familiar with DFSORT and DFSORT's ICETOOL, I'd
suggest reading through "z/OS DFSORT:  Getting Started".  It's an
excellent tutorial, with lots of examples, that will show you how to
use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.  You can access it
online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

0
yaeger (25)
2/9/2006 5:51:29 PM
mftips@gmail.com wrote:
> To Search for a particular string within a file when the exact position
> of that string within a record is not known and to write that record in
> the Output file the following SORT card can be used.
>...

Your examples are actually incorrect.  Your control statements contain
blanks that will result in syntax errors.  For example 1, the INCLUDE
statement should be:

   INCLUDE COND=(1,80,SS,EQ,C'FIND STRING')

Your second example does NOT do what you say it does.

   INCLUDE COND=(1,80,SS,EQ,C'HDR,TRL')

will actually include records with the string 'HDR,TRL' in them.  To
include records with the string 'HDR' or the string 'TRL' in them, you
would use this DFSORT INCLUDE statement:

   INCLUDE COND=(1,80,SS,EQ,C'HDR',OR,
                1,80,SS,EQ,C'TRL')

To include records with the string 'HDR' or the string 'TRL' in
positions 11-13, you could use this DFSORT INCLUDE statement:

   INCLUDE COND=(11,3,SS,EQ,C'HDR,TRL')

For those who are not familiar with DFSORT and DFSORT's ICETOOL, I'd
suggest reading through "z/OS DFSORT:  Getting Started".  It's an
excellent tutorial, with lots of examples, that will show you how to
use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.  You can access it
online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

0
yaeger (25)
2/9/2006 5:51:33 PM
On 9 Feb 2006 09:51:33 -0800, yaeger@us.ibm.com wrote:

>For those who are not familiar with DFSORT and DFSORT's ICETOOL, I'd
>suggest reading through "z/OS DFSORT:  Getting Started".  It's an
>excellent tutorial, with lots of examples, that will show you how to
>use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.  You can access it
>online, along with all of the other DFSORT books, from:
>
>www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
>
>Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
>Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
>=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/


What happened to
HTTP://PUBLIBZ.BOULDER.IBM.COM/CGI-BIN/BOOKMGR_OS390/BOOKS/ISPZU220/APPENDIX1
?
0
howard (6282)
2/9/2006 5:59:43 PM
Howard Brazee wrote:
> What happened to
> HTTP://PUBLIBZ.BOULDER.IBM.COM/CGI-BIN/BOOKMGR_OS390/BOOKS/ISPZU220/APPENDIX1
> ?

Howard,

Sorry, but I don't understand your question.  Are you looking for an
Appendix in a specific DFSORT book?  If so, which Appendix in which
book?  If not, please clarify.

Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

0
yaeger (25)
2/9/2006 6:09:16 PM
On 9 Feb 2006 10:09:16 -0800, yaeger@us.ibm.com wrote:

>> What happened to
>> HTTP://PUBLIBZ.BOULDER.IBM.COM/CGI-BIN/BOOKMGR_OS390/BOOKS/ISPZU220/APPENDIX1
>> ?
>
>Howard,
>
>Sorry, but I don't understand your question.  Are you looking for an
>Appendix in a specific DFSORT book?  If so, which Appendix in which
>book?  If not, please clarify.

I had it as a link written in as documentation for a job.  It no
longer points to anything and I want to update my documentation with
wherever that old documentation was moved to.   Trouble is, I don't
remember what it said.
0
howard (6282)
2/9/2006 6:34:23 PM
Howard Brazee wrote:
> On 9 Feb 2006 10:09:16 -0800, yaeger@us.ibm.com wrote:
>
> >> What happened to
> >> HTTP://PUBLIBZ.BOULDER.IBM.COM/CGI-BIN/BOOKMGR_OS390/BOOKS/ISPZU220/APPENDIX1
> I had it as a link written in as documentation for a job.  It no
> longer points to anything and I want to update my documentation with
> wherever that old documentation was moved to.   Trouble is, I don't
> remember what it said.

Sorry, I don't know what that used to point to so I can't help.

If you're looking for the DFSORT books, you can access them all from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

0
yaeger (25)
2/10/2006 5:40:41 PM
Reply:
Similar Artilces:

google search keyword for search password
google search keyword for search password google search keyword for search password talk about google search american journal of heart password edata-center.com begellhouse ingentaconnect clave medicine journal password OR pw OR pwd pubmed sciencedirect springerlink metapress swetswise proquest ejournals ebsco library ssn suid sunetid vpn ezproxy proxy scifinder full cv dob date of birth pdf rapidshare ebooks chm ovid oclc netlibrary fulltxt fulltext username   userid  login  log-in  id pswd Stat Ref yale staford harvard, the more sk...

Job Code : TSO6869
Job Code : TSO6869 - Urgent Need for Java Developer with Data Modeling experience at Rochester, MN Job Title: Java Developer Location: Rochester, MN Duration: 06 Months No. of open positions: 01 Pay range: open Job Description:- The Candidate will be working on a project team creating JAVA applications. The candidate will be expected to have working knowledge of relational databases, good analysis skills, and a very good understanding of Software Development lifecycle processes. Short Description:- Ideal Candidate will have experience in developing software applicati...

Want some extra cash, try this #2
want some extra cash, try this THIS REALLY CAN MAKE YOU EASY MONEY!! A little while back, I was on my computer having a grand old time, just like you are now and came across an article similar to this that said you could make thousands dollars within weeks with only an initial investment of $6.00! So I thought, "Yeah, right, this must be a scam", but like most of us, I was curious, so I kept reading. Anyway, it said that you send $1.00 to each of the 6 names and address stated in the article. You then place your own name and address in the bottom of the list at #6, and pos...

Beginner question: using a Linux machine on a WinXP home network
Sorry if this has already been answered, or if this isn't the right newsgroup to fire this question into. I have a home network with three WinXP machines. I'm always plagued with needing to have multiple copies of files on various machines, reading the same email several times on various machines, or using other machines to make backups. I also have an old MMX PC that I was thinking of installing Linux onto, and using it as a file server. Can I and other members of my household point our "My Documents" on each PC to a single location for each of us on a Linux partition, so ...

Using memoir
I want to use memoir. This is my file: \documentclass[12pt]{article} \usepackage{memoir} \begin{document} test \end{document} i keep getting the error: ! LaTeX Error: File `memoir.sty' not found. but there is no memoir.sty in the package at all? How to fix this? > \documentclass[12pt]{article} > \usepackage{memoir} > \begin{document} > test > \end{document} I may be mistaken, but I think memoir is a document class not a loadable package. You have to replace "article" with "memoir". Tweeg <yournick@gmail.com> wrote: ...

copying or moving the mail message using imaplib
Hi Friends, I am doing project in python.I am new to this. My problem is I want to move the mail message to other folder in the mail using imaplib (E.g) I want to move a message from the inbox to the Draft folder in my account using python code. Can any one help me by giving a sample code to do this? Thanks in advance > My problem is I want to move the mail message to other folder in > the mail using imaplib (E.g) I want to move a message from > the inbox to the Draft folder in my account using python > code. Can any one help me by giving a sample code to do thi...

Re: [tao-users] IDL Compiler : typedef boolean failed when used as parameter
Hi Sorin, > Yes, this was fixed a couple of weeks back: > > Thu Jan 15 15:50:41 2004 Jeff Parsons <j.parsons@vanderbilt.edu> BTW, this fix will be in the TAO 1.4.1 "bug fix only" beta that'll be released in a month or so. Take care, Doug ...

RTP/RTCP on ucLinux 2.0.38
Hello Everyone, I have a project on a NET+ARM based board with ucLinux 2.0.38.I have to get the NET+ARM section of the board to get Video/Audio data from a server like Darwin(by Apple) using RTP/RTCP.My queries are: 1)What are the Daemon processes I should have running on The Board and where can I get them.(should have a small memory footprint) 2)Are there any Constraints I should take into consideration. any comments regarding the above mentioned are welcome. Thanks, George. ...

case insensitive search with greek characters
Hi all, I 'm testing postgres 8.0 beta 1 an i have the following problem. I have a field with value . If i execute the following query it does not returns any rows. select * from test where descr ilike '%%' if i change the query to select * from test where descr ilike '%%' everything is fine. As you can see the problem is at char . I 'm using ENCODING = 'ISO_8859_7'. I also tried with unicode but no luck. An suggestions? Thanks, Gvre Giannis Vrentzos <gvre@NOSPAM.gvre.gr> writes: > ... everything is f...

Removing components from multiple vectors using identity vector
Sorry if there is a simple solution that I am missing, but I am stuck on this. I have a two vectors in which the index matches, so I want to keep them paired (A and B). I also have another vector (C) which is the same size that has a value of 1 for the indexes that I want to keep and a 0 for the indexes that I want to remove. I am doing a regression analysis on vectors A and B so I want to reduce the vector size instead of replacing the values with zero since it affects the coefficients and standard error. I also cannot replace the non-zero elements in A and B after multiplying since t...

DVD burners for semi-production use?
I'm looking for a DVD burner (IDE interface for an older G4 system) that will stand up to hard use. It looks like the (older) Pioneer DVR-109 in that system is dead after my son tried writing DVDs (for a school drama project) nonstop. Suggestions? (other than writing a DVD, waiting n minutes before writing the next -- any suggestions on reasonable values of n<30?) -- Namaste-- ...

Boolean search of Palm docs?
Is there a Palm program that will permit me to do a Boolean (or other logical operator-like search) of a group of documents on an SD card on my T3? megpoe@excite.com wrote: > Is there a Palm program that will permit me to do a Boolean (or > other logical operator-like search) of a group of documents on an SD > card on my T3? I know of two program which provide an enhanced global search including boolean search: - FindHack <http://perso.wanadoo.fr/fpillet/findhackGB.html> - IntelligentFind <http://www.intelligentfind.com> However, this requires that the program...

ISDN (was Re: 2 phone numers on one landline? (Slightly OT)) [Telecom]
On Thu, 12 Mar 2009 05:02:28 +0000 (UTC), David Lesher wrote, > >I have always been puzzled by Ma Bell's distaste for ISDN: if there's > >someone reading this that knows The Real Truth(tm), PLEASE tell us why. > >[I bet Fred Goldstein has some comments as well...] Well, since you asked politely... ;-) To answer Lisa's question, ISDN is basically The Telephone Network (PSTN), with the subscriber connections digital rather than analog. The guts of the network are 64000 bps digital, so why use analog at the edges? And if it's digital, why use anci...

Searching in Arrays
Hi, I'm fairly new to Java and I'm trying to make a program that will store certain objects and then list them depending on their features. I hope this makes sense and I hope I get the terminology right! For example, I want to store instances of "people" and they need to have true or false to the following questions. Are they male? Are they tall? Do they have brown eyes? Then I want to be able to list all of the people who are not male, all that are tall and all that have brown eyes. What is the best way to store them and how can I return the people with brown eyes, for e...

Search Portal etc
Hello Erik Appeldorn You gave me a technique for creating a search portal once; for searching fo= r products in a db via a search portal. 'Search' is a T.O. related to the = original product db. Relationship exists via the following text calculatio= n functions. searchstring (but with every space character replaced with a carriage retur= n) <=3D searchstringzzzzzzzzzzzzzz AND searchstring (but with every space character replaced with a carriage retur= n) >=3D searchstring .=20 I've used it before and it's worked ok , but for my current data set of pro= ...

Newbie: Searching for a Projekt to practice C programming
Hi I have finished reading a book about C Progamming ("The ANSI C Programming", by the way its very good and i can just recomend it). Now I want to practice and improve my programming skills. I have searched for a project to contribute to. The first thing i did was to look at the registered pojects at www.sourceforge.net. But I found it very hard to choose a project, because there are so many and i do not really know which ones are suitable for newbies. I also did some googling and did not found any suggestions. So it would be very nice when somebody could suggest some projects. It ...

[ANN] lockfile-1.2.0
URLS http://raa.ruby-lang.org/project/lockfile/ http://www.codeforpeople.com/lib/ruby/lockfile/ SYNOPSIS lib/lockfile.rb : a ruby library for creating NFS safe lockfiles bin/rlock : ruby command line tool which uses this library to create lockfiles and to run arbitrary commands while holding them. run 'rlock -h' for more info INSTALL sudo ruby install.rb BASIC ALGORITHIM * create a globally uniq filename in the same filesystem as the desired lockfile - this can be nfs mounted * link(2) this file to the desired lockfile...

cellarray search #2
Hi everybody I have a cellarray called stringcell: stringcell={'M1_Beer_Carlsberg';'M2_Book_Football';'M3_Beer_Heineken';'M4_Beer_Newcastle';'M5_Book_Basketball';'M6_Beer_Slots';'M7_Cars_Toyota'}; I also have another cellarray called checkboxstring: checkboxstring={'Beer' 'Book'} I want to find all strings that contains the string 'Beer' and 'Book' and store the strings in a new cellarray called cell_no. In the example above the cellarray should look like: cell_no={'M1_Beer_Carlsberg';'M2_...

FACTS SHOCKING BUT TRUE! #2
Y A O H =DA S H U A FACTS SHOCKING BUT TRUE! 1. The real, original and genuine Name of our Creator in the original Hebrew Holy Scriptures is 'YAO-HOO' and that of the genuine Messiah is 'YAO-HOO-SHUA.' (accented on the syllable 'hoo') 2. Salvation is found in nobody else for there is no other name under heaven given to men for salvation except: 'YAOH=DASHUA' - Acts 4:12, Holy Scriptures. 3. Whoever calls upon the Name of 'YAOH=DASHUA' shall be saved from all the curses and penalties of sin, such as poverty, diseases, failur...

[rfc-dist] RFC 5202 on Using the Encapsulating Security Payload (ESP) Transport Format with the Host Identity Protocol (HIP)
A new Request for Comments is now available in online RFC libraries. RFC 5202 Title: Using the Encapsulating Security Payload (ESP) Transport Format with the Host Identity Protocol (HIP) Author: P. Jokela, R. Moskowitz, P. Nikander Status: Experimental Date: April 2008 Mailbox: petri.jokela@nomadiclab.com, rgm@icsalabs.com, pekka.nikander@nomadiclab.com Pages: 30 Characters: 68195 Upd...

Search Site
I'm trying to configure a search site for two databases using the search site template. However, I cannot find information on how to add the databases I want to search. (This is the first time I'm using it). Tks!! ...

Test 3/20-2
Vernal Equinox -- Elf Lord ...

[News] Use of Eclipse More Than Doubles
Developers' use of open source Eclipse doubles ,----[ Quote ] | The adoption rate of the open source Eclipse integrated development | environment has more than doubled in the Europe, the Middle East and | Africa region, industry analysts have revealed. `---- http://www.computerweekly.com/Articles/2006/12/12/220548/developers-use-of-open-source-eclipse-doubles.htm Related: Study: Developers Favor Linux ,----[ Quote ] | "Regardless of what kind of developer you are, you're still trying to | make a living, and target the operating system that?s controlling the | market." |...

1 left justified string, 1 centered 1 right justificed on the same line?
I want to (on one line) show something like the following ------------------------------------------------------- left centered right ------------------------------------------------------- If I use <hr> to draw the lines, then there is too much space between the line and the text If I use a table, then how do I get the right-justified string to be at the right margin of the page and the centered string to be in the center? Also, how do I remove the vertical bars in the table? Thanks. Austin Powers wrote...

Problems with building an application using ACE 5.5 in Solaris 5.8!
Hi, The following error was reported while building my application using ACE 5.5 in Solaris 8 ace5.5/ace/OS_NS_Thread.h", line 1526: Error: ACE_rwlock_t is not defined. But, however after defining _POSIX_PTHREAD_SEMANTICS in my make file, the problem was solved. I included it in my makefile as it was not defined in the ace config file. Please let me know if this is the right way to solve this or is there a better way? Thanks in Advance! Regards, Jayaraghavendran.K ...