As400 copy spool file ifs




















Although we are looking at this process from a Sequel report point of view, you can easily apply these examples to any spooled output on the Power i. The process involves identifying the output queue or queues for archiving and specifying rules for selecting the specific spooled files to archive. Once Esend forwarding is started, any spooled file arriving on a designated output queue will be checked against the rules set up for that output queue.

If the spooled file meets the criteria of a forward- ing rule, the actions defined in that rule will be applied. The two steps that follow explain the process:. Spool File Selection Forwarding rules can be specified with varying degrees of selectivity. The simplest rule will auto- matically include all spool files. If necessary, spool files can be selected based on any combination of the following values: spool file name, job name, user profile, form type and user data. Leave the selection values blank to include all spool files.

Esend forwarding rules can use any of the following variables to make the rule dynamic or the output unique. When a forwarding rule is applied, the variable portions of the rule are replace with the value indicated by the variable.

Customer Portal. Simple Archive Process to the IFS Create the folder s on the IFS to use as the warehouse for your spooled files this process usually requires security officer level authority. This is the path you will specify as the destination for the any of the spooled files you want to copy archive from a given output queue to this folder on the IFS.

On the next screen you can tailor the command to use any spooled file s you choose and copy them to the IFS folder you specify. The two steps that follow explain the process: Identify the output queues you want to archive using option 15 on the Esend menu. To be ar- chived, spooled files must arrive on the output queue released for printing. The next section is for the display file and the validation of the entered file and library names.

Line 5: The start of the Do loop , that ends at line Line 7: Alas, there is no indicator data structure in CL, so I have to use the number indicator for the F3 key. Lines 8 and 9: These are the indicators I will be using for flagging errors.

Without the indicator data structure I have to use the numbers rather than have indicators with meaningful names. Line Check if the library exists. I check the library first rather than the file, if the library does not exist neither does the file. Lines 11 — A Monitor message group.

If there is an error when the command is executed indicator 51 is turned on, and I iterate to the top of the Do loop. Lines 16 — This Monitor message group is pretty much the same as the previous one, this time indicator 50 is turned on. Line If there were no errors I leave the Do loop, and continue to the next section of the program.

Therefore I need to build the string to contain that in a variable, using the concatenation shortcuts. Line Rather than "replace" I prefer to try and delete a file with the same name from the folder first.

There are several different commands I can use to do that, I have preferred using DEL as I think it obvious what it does. Depending on your IBM i you may not have to do this. And I want the column headings to be the names of the fields from the copied file. I drag-and-drop the file to a folder on my PC. I can then use all of Excel functions to analyze the data within. Rather than use Operations Navigator I could map a Window's Network Drive to my folder and then use that to get to my copied file.

I will explain how to map a network drive to a folder in IFS in another post. You can also use ACS, version 1. Just click on the Action menu in the screen and select Integrated File system.

Enter a path to the file in the directory, right click on the file and select download. Also, I use a timestamp in the csv filename to avoid conflicts with multiple concurrent users attempting the same thing. Good stuff, keep it up! My experience runs counter to yours. The folders are secured using their IBM i profiles. I have written about emailing files from the IFS before. The programs I write for the users all use this approach. Sometimes I need to generate a very large CSV. If the file is large enough it will be rejected by the mail server.

The idea of using the timestamp as part of the file name is a good one. On the screen you can select "execute SQL-Scripts". Then go to the Options-Menu and select "always" for download activation. Then run a select-command to find your data. Right click the result window and select download. Enter a path in the directory and click OK. At the end of the download the system ask you if you want to open the file in Excel.



0コメント

  • 1000 / 1000