IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need a REXX tool for comparing variables in 2 files


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ankit0610

New User


Joined: 18 Jul 2006
Posts: 4

PostPosted: Tue Jul 18, 2006 10:24 am
Reply with quote

Hello Everyone.
I need a tool in REXX which will compare variables given to it and search them in the 2 files (both the files are having same layout and r Sequential files)
..e.g. Lets say i wil give 3 variables A, B, C as the input to REXX tool.. it should search these 3 variables in 2 files and give me the results as :-
Variable Name, Variable Value(from 1st File) ,Variable Value(from 2nd File)

A Value of A Value of A
B Value of B Value Of B
C Value of C Value of C

Can anybody help me how can i achieve this??

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

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jul 18, 2006 12:36 pm
Reply with quote

Three options:
1. Invoke SUPERC from within your REXX. This is the fastest option, but it depends on the complexity of your query.
2. Use EXECIO. Read the files line by line and look for the values. It will let you query very complex situations, but you are limited by the files size.
3. Use Edit-Macro.

O.
Back to top
View user's profile Send private message
ankit0610

New User


Joined: 18 Jul 2006
Posts: 4

PostPosted: Tue Jul 18, 2006 12:44 pm
Reply with quote

Thanks Ofer71 for your quick response..i have never involed Super C from REXX before, can you help me with the syntax?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jul 18, 2006 12:58 pm
Reply with quote

Take a look at SUPERC job (or generate one in 3.15). That will give you a hint about what you need for SUPERC invocation regarding input and output. Create a REXX with the following steps:

1. Allocate your input dataset to NEWDD.
2. Allocate yout output dataset to OUTDD.
3. Allocate SYSIN. QUEUE the line(s) with the search keywords.
4. Put your parms in a variable (for example PARMS='ANYC')
5 .Issue ADDRESS ISPEXEC "SELECT PGM(ISRSUPC) PARM("PARMS")".

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top