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



IBM's Command List programming language & Restructured Extended Executor

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

Postby pkbtech007 » Wed Sep 10, 2008 2:50 pm

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.
pkbtech007
 
Posts: 1
Joined: Wed Sep 10, 2008 2:39 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby expat » Wed Sep 10, 2008 4:03 pm

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
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post