• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1696
  • Last Modified:

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

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
asdf13
Asked:
asdf13
  • 3
  • 2
  • 2
2 Solutions
 
Gary PattersonVP Technology / Senior Consultant Commented:
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
 
tliottaCommented:
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
 
asdf13Author Commented:
 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
tliottaCommented:
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
 
asdf13Author Commented:
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
 
Gary PattersonVP Technology / Senior Consultant Commented:
Well, it isn't the -only- way, but it is, as far as I know, the -easiest- way.

- Gary Patterson
0
 
tliottaCommented:
> ...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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now