Page 1 of 1

REXX - EDIT DSN - Need to use F ALL and C ALL

PostPosted: Wed Sep 10, 2008 2:50 pm
by pkbtech007
Hi,

I have 2 input DSN.

Input 1:

****************************************
160112233description1
****************************************

Input 2:


****************************************
130dndnkjdndjksndjksdescription2
130sdsdsmfdnfndsndescription2130
..................................
..........................
******************************************


From Input 1: I need to take the value and search in input 2 and update it.
Say from input 1 i need to take the value '160' and in input 2 i need to search for 130 and replace with 160.

For some values it is possible to give the position in Input 2 where it occurs. Say C ALL '130' '160' 1 3 (Change the values of 130 which is in Pos 1-3 alone)

For some values like description1 the exact postion in the Input 2 file cannot be given. in that case whereever description2 is specified in input2 file, it needs to be replaced with description1 (specified in Input1).

Is the above function can be done in Rexx? If so please help me out in writing the code as i'm new to rexx.

Thanks.

Re: REXX - EDIT DSN - Need to use F ALL and C ALL

PostPosted: Wed Sep 10, 2008 4:03 pm
by expat
OK, you do have some amount of reading to get through.
REXX reference, and the ISPF EDIT macro documentation.

How do you dermine the contents of Input1 - Field length or what because I can see no easy way of knowing what you want to do.

But if you know that ..........
Create a stem of change froms with a corresponding stem of change tos and then execute an ISPF edit macro for each component of the stem