TechTalk: Adopting Authority?

Security - Other
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Our shop runs under V2R1M1. The end users sometimes submit jobs that clear or delete a file. Granting the user the authority to do this requires compiling the CL program adopting authority, by specifying USRPRF(*OWNER) instead of *USER.

An authority problem we've encountered seems to arise from a certain sequence of events. Let's say you've just written a CL program that will be submitted by an end user and clears a file. You compile it with the default of *USER, realize your error and recompile it with a user profile of *OWNER. You print out the compile source listing and confirm the USRPRF parameter is *OWNER. That looks fine so you move the program into production and the user makes the selection to submit the job. The job bombs with the message that the user has no authority to clear the file.

Now you double-check your compile source listing. There it is in black and white: USRPRF(*OWNER). Confused, you display the program with the DSPPGM command and guess what? The user profile is *USER! Of course, the Change Program (CHGPGM) command enables you to modify the user profile for the object, so the problem is correctable, but it is certainly misleading.

Editor's Note: This error happens every time you use the REPLACE(*YES) option in the CRTxxxPGM commands. When you specify REPLACE(*YES), the system recompiles the program but gives the new object the same value it previously had in the USRPRF parameter-not the value you supplied in the CRTxxxPGM command. To avoid this problem, you need to delete the program with the DLTPGM command before recompiling, or run CHGPGM afterwards to fix the problem. This so-called "feature" of the compiler has existed for years.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: