?
Solved

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

Posted on 2009-05-07
7
Medium Priority
?
1,688 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 35

Assisted Solution

by:Gary Patterson
Gary Patterson earned 300 total points
ID: 24328737
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
ID: 24328867
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
ID: 24329136
 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
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
LVL 27

Accepted Solution

by:
tliotta earned 450 total points
ID: 24329766
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
ID: 31578919
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 35

Expert Comment

by:Gary Patterson
ID: 24330173
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
ID: 24330601
> ...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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

801 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