Authority to run a job to delete libraries and also sending spool files via email
20 pts.
0
Q:
Authority to run a job to delete libraries and also sending spool files via email
Hi...could anyone please provide some guidance on the following:-

I have been tasked with deleting libraries on our devlopment machine.

I have used s DSPOBJD in my CL and specified QSYS in the library parameter to pick up all the libraries on the subsystem which are prefixed with certain letters i.e. 'TES* etc......and specify the output to go to an outtfile in QTEMP..

I then have an RPG to read the outfile and depending upon certain criteria..if it's been saved to tape being one of these I then delete it using QCMDEXC.

How do I need  to consider being authorised to delete these libraries or is just a matter of ensuring that this job is run using a jobd/user profile etc.  which gives me the correct priveleges to delete any library ..would I need to change the authorities  to each library before I delete this?

My second question is that this job produces some reports which I need to send to an email account as a PDF file...is there a way to do this?     


Software/Hardware used:
i-series
ASKED: Nov 5 2009  2:39 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
7525 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button
If your profile does not have the proper authorities, then I would suggest you run the program with one that does.

As far as the reports go, you can look into one of the several email programs, both free and commercial, that are available for the iSeries. MMAIL and RPGMAL are two of the free ones that come to mind. I think MMAIL even has a spool file to PDF converter.

There are a host of commercial email programs out there also. The one that we use is MAILTOOL and MAILTOOL Plus by Brad Stone.

_______________________

You could chgobjown of your program to a user that has sufficient authority to delete the libraies. Then chgpgm to usrprf (*owner) useadpaut(*yes) so the program will use the owners authority regardless of the user who submits the program. I would recommend public(*exclude) for your program and add authorized users individually.

IBM's Infoprint Server for iSeries (5722-IP1) enables the production of Adobe Portable Document Format (PDF) files from any iSeries output.

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

Note that USEADPAUT(*YES) is unnecessary if USRPRF(*OWNER) is supplying desired adopted authority. USEADPAUT(*YES) would only be needed if the program required adopted authority from higher in the call stack. And since USEADPAUT(*YES) is the standard default anyway, it's usually discussed in terms of USEADPAUT(*NO) where the intention is to block adopted authority from propagating into and through this program, potentially down to even lower call-stack levels.

Tom
Last Answered: Nov 6 2009  2:04 AM GMT by TomLiotta   7525 pts.
Latest Contributors: Whatis23   4040 pts., Teandy   3215 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Djb   20 pts.  |   Nov 6 2009  12:47PM GMT

Many thanks Tom…I’ll look further at how we need to run this…you’re idea for the chgobjown etc. seems a good one…do you think that the DSPOBJD would be the best way for me to know that I have picked up all the libraries that I need?…

 

Wpoulin   1115 pts.  |   Nov 6 2009  4:03PM GMT

Nobody’s mentioned that you can use CPYSPLF, CPYTOPCD, and SNDDST to convert your spool file to a PDF and send it as an email attachment. All native commands in OS/400, available at no cost.

Hope this helps,
Bill

 
0