Solved

OS400: Modify WRKDIRE entries by program after restore on other Partition ?

Posted on 2009-05-07
7
1,636 Views
Last Modified: 2013-12-06
OS400: Modify WRKDIRE entries by program after restore on other Partition ?
How to change SYSTEM-Name (in QUSRSYS / QAOK* files) by program, after restore on different System and other Systemname ?
0
Comment
Question by:asdf13
  • 3
  • 2
  • 2
7 Comments
 
LVL 34

Assisted Solution

by:Gary Patterson
Gary Patterson earned 100 total points
Comment Utility
My suggestion is to dump the original entries into an output file using DSPDIRE, and then write a simple little CL that reads the file and creates the new entries with via ADDDIRE.

We've written programs that automatically add users to the system directory in this fashion in the past and it is a fast and easy process that requires only basic CL programming skills.

- Gary Patterson
0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
asdf13:

What "SYSTEM-name" are you trying to change in a directory entry?

If you prompt the CHGDIRE command and enter a User ID and Address, the remaining existing parameter values will be filled in for you. If you then press <F11>, the parameter names will be shown next to the values. Which parameter names are you thinking about?

Generally, restoring these files into QUSRSYS on a different system is _not_ a good idea. It would be far better to restore these into a work library. Then read each record and execute ADDDIRE for each one. Use old values when appropriate and specify new values for parameters you want to change.

Tom
0
 

Author Comment

by:asdf13
Comment Utility
 So, only way :
DSPDIRE to outfile (delete old entry on new system which are already restored) and then ADDDIRE from outfile, with modified parms ??                        


                                             Directory entry change

 User.-ID/Adresse . . . . :     AFCOPER   S44A1234       <-   shoult be changed to S44A9999
                                                                                              but not from menu possible

   Beschreibung  . . . . .        Auto Forms Control - Operator
   Systemname/Gruppe . . .   S44A9999                               already OK          
   Userprofil  . . . .                 AFCOPER                
   Netzwerkbenutzer-ID . .    AFCOPER  S44A1234      <-   shoult be changed to S44A9999  

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 27

Accepted Solution

by:
tliotta earned 150 total points
Comment Utility
asdf13:

Before doing anything, run GO LICPGM and take option 10='Display installed licensed programs'. Check the 'Installed Status' of "Library QUSRSYS" (or "OS/400 -- Library QUSRSYS" on earlier releases).

I won't be surprised if it shows [*ERROR]. If it does, then the needed sequence is much more complex.

In any case, the general idea for this specific part is as you said. You will probably only run ADDDIRE for userIDs that have address 'S44A1234'. Skip any others.

Also, you _might_ need to run RMVDIRE for the existing userID/address entry before you can add the new entry back in. It's been far too long since I've done this kind of thing.

Study the DSPDIRE parameters to understand the output that you will produce. Run it to a QTEMP outfile a few times and see what the different types provide, as well as the difference between *BASIC and *FULL.

Tom
0
 

Author Closing Comment

by:asdf13
Comment Utility
Thanks ! i think, the solution as discussed will work.
But for future "setting ups" with  systemcopies on a new hardware (with total save "Option 21" and go restore . . .
and then NETA (systemname)  must be changed for test reasons to TESTXYZ . Then i run again in this problems with DIRE !.........
 
0
 
LVL 34

Expert Comment

by:Gary Patterson
Comment Utility
Well, it isn't the -only- way, but it is, as far as I know, the -easiest- way.

- Gary Patterson
0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
> ...it is, as far as I know, the -easiest- way.

That's true. IMO, it's not even the completely correct way. It merely addresses the specific question, unfortunately.

Tom
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now