Splat
1260 pts. | Nov 27 2009 4:07PM GMT
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.
TomLiotta
15390 pts. | Nov 29 2009 9:35PM GMT
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
Splat
1260 pts. | Dec 1 2009 3:39PM GMT
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.
TomLiotta
15390 pts. | Dec 1 2009 7:39PM GMT
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
TomLiotta
15390 pts. | Dec 1 2009 7:41PM GMT
(QSYS qualification isn’t actually needed for CHGOBJD when object type is *USRPRF.)
Tom






