View previous topic :: View next topic
|
Author |
Message |
ankit0610
New User
Joined: 18 Jul 2006 Posts: 4
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
ankit0610
New User
Joined: 18 Jul 2006 Posts: 4
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
|