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
 

 

searching all the elements in the file in an another file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
kalyan.kakinada

New User


Joined: 03 Jul 2009
Posts: 3
Location: bangalore

PostPosted: Thu Jul 09, 2009 1:20 pm    Post subject: searching all the elements in the file in an another file
Reply with quote

Hi,

I have file with list of all the elements. My requirements is to search each of these elements in another PS file and to list down the not found elements using REXX.

EX:
====
i/p 1FILE : x.y.z
contents :
A
B
C .

i/p2 FILE : A.B.C
DATA:
ABSLA.A
DDS;D.SD
DCDALKSA

O/P :

C

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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 09, 2009 1:35 pm    Post subject:
Reply with quote

You have not made your requirement very clear with the data shown.

REXX is not the best tool for this, maybe SORT would be better if the record count is high.

Please explain exactly what you want to achieve, giving RECFM and LRECL for each dataset, key positions, lengths and formats.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jul 09, 2009 2:50 pm    Post subject: Reply to: searching all the elements in the file in an anoth
Reply with quote

Kalyan,

Respond to Expat and also for the following

Quote:
O/P :

C


Need explanation.

Quote:
search each of these elements in another PS file


What do you mean by elements? Are you referring to records or fields?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2033
Location: Silicon Valley

PostPosted: Thu Jul 09, 2009 9:31 pm    Post subject: Reply to: searching all the elements in the file in an anoth
Reply with quote

The example was not clear because 'C' was included in the third line of your data file.

Also, your search data was A, B, C and the file name was A.B.C, adding to the confusion (and C was part of the file name).
Back to top
View user's profile Send private message
kalyan.kakinada

New User


Joined: 03 Jul 2009
Posts: 3
Location: bangalore

PostPosted: Fri Jul 10, 2009 10:03 am    Post subject: FINDING STRING IN A FILE AND IF NOT FOUND DISPLAY
Reply with quote

File 1 . - I have ps file and i have listed all the policies numbers one by one in the file.
File 2. - I have ps file with huge data.

Through rexx program i just want to search each of the policy in file1 in the file2.

An un match or Not found should be displayed or should be written to an another o/p file.

Its just a find .
EX:
====
i/p1 FILE : File1 :
A
B
C .

i/p2 FILE : File2 :
AAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBB

O/P :

C

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 10, 2009 11:19 am    Post subject:
Reply with quote

As you say HUGE data I would suggest a SORT solution.

From my previous post
Quote:
Please explain exactly what you want to achieve, giving RECFM and LRECL for each dataset, key positions, lengths and formats.

I do see rather a lack of pertinent information lacking, even though it was requested.

Please - we do not ask you for information because we are bored and want to make you do things for a laugh,
we ask because it is needed to resolve the problem in hand.

We could always guess at where the fields are, after all it might be psychic day today.
Back to top
View user's profile Send private message
kalyan.kakinada

New User


Joined: 03 Jul 2009
Posts: 3
Location: bangalore

PostPosted: Fri Jul 10, 2009 1:10 pm    Post subject:
Reply with quote

Both the files are of same LRECL and Format .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 10, 2009 1:17 pm    Post subject:
Reply with quote

expat wrote:
Please explain exactly what you want to achieve, giving RECFM and LRECL for each dataset, key positions, lengths and formats.


kalyan.kakinada wrote:
Both the files are of same LRECL and Format .


Sigh .............. I sometimes wonder why I bother 36_2_18.gif

Please look carefully, very very carefully at what was requested, and then take a look at the c**P you replied with.

Please respond with EXACTLY what has been requested.
It's hardly rocket science ................ is it
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 10, 2009 1:19 pm    Post subject:
Reply with quote

expat wrote:
Sigh .............. I sometimes wonder why I bother


gee, I wonder why he is not asking a co-worker?
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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