Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I update one file with data from a second file using a script?

Status
Not open for further replies.

RCPD700

MIS
Jun 20, 2001
75
US
I'm still fairly new to AIX, so I need some help...

We're running a transaction processing system similar to CICS (Unikix) which runs 24x7 except for a very brief recycle at 0430 Tue-Sat to implement terminal and user table updates. The recycle normally takes less than 1 minute.

When our user table was migrated from CICS, the conversion folks used the User ID as both User ID and User Name even though we supplied both to them. I really need to have the user names in this table of ~2,650 entries. If I could somehow also get the OPID (user's initials) updated, that would be great, but it's not required.

Since a script is used for the recycle, I figure I could make a temporary copy of it modified to do the update, and then the recycle. The process would go as follows:

1) Export the existing table as [green]File1[/green] - creates a comma-separated file with .lst extension
2) Update the first field in [green]File1[/green] with the user's name from the first field of the [blue]File2[/blue] entry having a match on User ID (field 2 in both files)
3) Import the updated file [green]File1[/green] into the system to generate an updated internal system table (which is also written to disk as a .tbl file)
4) Recycle the system
5) Optionally rename the temporary update script so it won't be used again, then rename the original recycle script so it is used next time as normal (no update).

Is this possible to do? If so, how can I accomplish it? If not, what recommendations might you have to perform this update?

File information / sample attached

Thanks in advance for any assistance

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top