PDA

View Full Version : Using SEU - CL programming



Guest.Visitor
01-01-1995, 02:00 AM
Hi, I created I CL program with a CALL command. This CALL execute one program that generate a report (file) on spooled file. My aim is print this report automatically. So I want to insert the CHGSPLFA command after CALL command. My doubt is: what values I can put on File, Job(number, user, jobname) parameters to reference the report I still generate. thanks!

B.Myrick
06-01-2000, 11:36 AM
Deisi, Please provide more information on what you want the end result to be. Bret Myrick

Guest.Visitor
06-01-2000, 11:50 AM
Deisi, You can use OVRPRTF command for the print file, in CL, and can assign any parameters, like, to hold printing or print immediately. Alam

Guest.Visitor
06-01-2000, 12:45 PM
Bret, I found the solution, yet. My problem was define values to complete the CHGSPLFA parameter. I thought that I have to put something on ? CHGSPLFA FILE(?) JOB(?/?/?) So I tried CHGSPLFA FILE(*SELECT) SELECT(*CURRENT *ALL *ALL + ORELATBO) DEV (DEISIB) and works well. Thanks a lot!

Guest.Visitor
06-03-2000, 10:35 AM
You may find that Mohammed's suggestion is more "robust" and simpler. It's also a much more standard approach than the one you're choosing (tried and true and easier for other programmers to maintain). Also, I would advise that you not hardcode anything like output queue, device names, etc. Instead, use job descriptions and, if need be, OVRPRTF. Example: I have a nightly scheduled job. In it are many programs/commands I've written. Each has been written to take the job description settings for job queue, output queue, library list, etc. These commands can also be run during the day, interactively or submitted, by our users, if needed. If users run the command, I don't want the output to go to the same place as that which is generated by our nightly scheduled job. It's so simple with job descriptions! The output goes to the output queue of whoever ran the command. I never have to maintain that aspect of that application again, ever, as long as I or that application live. It doesn't take a programmer to change output queues for the nightly process, either. Just a change to a job description, and it's done. It even works with query spooled output. The AS/400 has been designed to be a really, really low-maintenance system. And things like job descriptions are one of the wonderful features about it. But we, as developers, have to use what IBM's provided for us to make the best of a good system. Good luck!