Change Text Description of All the AS/400 User Profiles (roughly around 1000) in the system.

215 pts.
Tags:
AS/400 administration
AS/400 user profiles
Hi, We are in the process of making a slight change in the Text Description of All the User Profiles in the system. The figure of All the user profiles in the system roughly goes to 1000.

Changing the Text Description of a single user, one-by-one will be a lot tedious. Request you all to let us know if the Text Description of the All the User Profiles can be Changed in one short using SQL.



Software/Hardware used:
V5R4 on i570 Power 6

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t know if you can do this through SQL but you can through a simple CL program. Display all of the user profiles to an outfile, then loop through the outfile and change the text for each one.

=======================================================

Technically, you could do it with SQL, but it would be more complicated than doing it other ways. Since user profiles aren’t part of the database, SQL isn’t closely related. You can create stored procs or other items to execute CHGUSRPRF commands, but why?

The suggestion to write a CL “script” that reads new texts from a file and assigns them with CHGUSRPRF is the right way to go. If it must be done.

Now, whether it’s a good idea… that depends on what info will be encoded in the text, I suppose.

Tom

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Splat
    I wouldn't bother with CHGUSRPRF. Running under a profile with the necessary authorities, I'd write a CL to do a DSPOBJD OBJ(*ALL) OBJTYPE(*USRPRF) OUTPUT(*OUTFILE) OUTFILE(library/file), then read through the outfile and execute a CHGOBJD OBJ(&ODLBNM/&ODOBNM) OBJTYPE(*USRPRF) TEXT('New text') on the user profile object. The original text (&ODOBTX) will be available if you're looking to modify existing text.
    7,235 pointsBadges:
    report
  • TomLiotta
    Why use a generic CHGOBJD when a specific CHGUSRPRF is available? If maintenance is against a specific object type and an interface is supplied for it, I'd go with the supplied interface. Many other attributes are available with CHGUSRPRF. And the same &ODOBTX would be just as available. Tom
    125,585 pointsBadges:
    report
  • Splat
    Why use a CHGUSRPRF when a CHGOBJD is specific to the job at hand? If there were changes being made to attributes of the profile object beyond just text I'd agree - as the changes are only being made to profile object's text, I say keep it simple.
    7,235 pointsBadges:
    report
  • TomLiotta
    I say keep it simple. Good point. If that's the primary criteria:
    CHGUSRPRF USRPRF(TOML)
              TEXT(&ODOBTX)
    ...or:
    CHGOBJD OBJ(QSYS/TOML)
            OBJTYPE(*USRPRF)
            TEXT(&ODOBTX)
    CHGUSRPRF is only slightly more simple. But if simplicity is paramount...? Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    (QSYS qualification isn't actually needed for CHGOBJD when object type is *USRPRF.) Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following