1: First, you will need to create a physical file with a record length 1 greater than the record length of the spooled file. This extra byte will be used for a First. Transfer a text file to the database on the AS/400. The resulting file on the as400 has the text only (no srcseq etc). This was first published in June 2001. Copy spool files to a PC text file. by Praveshree Mahabeer. Click the spool file you wish to copy. 8. Drag the spool file into a folder in your Windows Explorer.IBM Copying the Text from a Spooled File Using System i Navigator This document provides information on using System i Navigator to copy the text from an operating system spooled file into an ASCII text file on the PC. Important Note: This document discusses Client Access for Microsoft Windows 9. Windows NT, Client Access Express, IBM i. Series Access products, IBM System i Access and IBM i Access products. These names essentially refer to the same product; however, the functionality and name changed over the last several releases. For the purposes of this document, the terms Client Access, Client Access Express, i.
Series Access, System i Access and IBM i Access can be used interchangeably. Where a difference is important, the version of the product is used to identify the differences. This document also refers to System i Navigator, which is the name used for the most recent versions of IBM i Access, even though the information applies to Operations Navigator as well. This document provides information on using System i Navigator to copy the text from an IBM OS/4. IBM i. 5/OS spooled file into an ASCII text file on the PC. This is done by finding the spooled file in either the Basic Operations > Printer Output or Basic Operations > Printers container within System i Navigator, then using the Drag- and- Drop method or the Manual Copy method to copy the spooled file to the Windows Desktop or Windows Explorer. This document was last updated on 4 November 2. This document contains the following sections. Finding a Spooled File in the Basic Operations > Printer Output container within System i Navigatoro. Finding a Spooled File in the Basic Operations > Printers container within System i Navigatoro. Finding a Spooled File in the Basic Operations > Jobs container within System i Navigatoro. Finding a Spooled File in the Work Management > Output Queues container within System i Navigatoro. Copying the Text of a Spooled File to the PCNote: This works with most types of spooled files including *SCS, *AFPDS, and *IPDS spooled files as long as the spooled file contains text. However, this will not work with most *USERASCII spooled files. Attempting to open a *USERASCII spooled file, or any other spooled file that does not contain text data, will typically result in message. CPF3. 4C7 - Spooled file & 1 number & 7 cannot be converted, for example. One notable exception is *USERASCII spooled files that contain PDF print data, which should result in System i Navigator opening the PDF using Adobe Reader. Finding a Spooled File in the Basic Operations > Printer Output container within System i Navigator. If running IBM i Access Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM i Access for Windows, IBM i. Series Access for Windows, or IBM AS4. Client Access Express, and then System i Navigator. Note: If running i. Series Access for Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM AS4. Client Access Express and AS4. Operations Navigator. Click on the Plus Sign ("+" ) in front of the system where the spooled file is stored. Click on the Plus Sign ("+" ) in front of the Basic Operations container. Click on the Printer Output container. Look through the list of spooled files shown to see if it contains the spooled file to be copied. If the spooled file is not found, try using different settings on the Printer Output - - Include tab to specify which printer output you want to display in the list. For example, you can select printer output based on the User, Printer, Output queue, Form type, User- specified data, Status, and/or Job name. If running System i Navigator, the Printer Output - - Include tab can be reached by pressing the F1. View > Customize this View > Include from the menu bar. Note: If running Operations Navigator, the Printer Output - - Include tab can be reached by selecting Options > Include from the menu bar. If necessary, double- click on the spooled file to display it using the AFP Workbench Viewer, or right- click the spooled file and select Properties from the context or pop- up menu, to verify that you have the correct spooled file. Refer to the section entitled Copying the Text of a Spooled File to the PC below for information on copying the text of the spooled file to the PC. Finding a Spooled File in the Basic Operations > Printers container within System i Navigator. If running IBM i Access Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM i Access for Windows, IBM i. Series Access for Windows, or IBM AS4. Client Access Express, and then System i Navigator. Note: If running i. Series Access for Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM AS4. Client Access Express and AS4. Operations Navigator. Click on the Plus Sign ("+" ) in front of the system where the spooled file is stored. Click on the Plus Sign ("+" ) in front of the Basic Operations container. Click on the Printers container. Look through the list of printers shown, then double- click on the name of the printer. Look through the list of spooled files for the selected printer to see if contains the spooled file to be copied. If necessary, double- click on the spooled file to display it using the AFP Workbench Viewer, or right- click the spooled file and select Properties from the context or pop- up menu, to verify that you have the correct spooled file. If the spooled file is not found, try using the Basic Operations > Printer Output container. For more information, refer to the section entitled Finding a Spooled File in the Basic Operations > Printer Output container within System i Navigator above. Refer to the section entitled Copying the Text of a Spooled File to the PC below for information on copying the text of the spooled file to the PC. Finding a Spooled File in the Basic Operations > Jobs container within System i Navigator. If running IBM i Access Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM i Access for Windows, IBM i. Series Access for Windows, or IBM AS4. Client Access Express, and then System i Navigator. Note: If running i. Series Access for Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM AS4. Client Access Express and AS4. Operations Navigator. Click on the Plus Sign ("+" ) in front of the system where the spooled file is stored. Click on the Plus Sign ("+" ) in front of the Basic Operations container. Click on the Jobs container. Look through the list of jobs shown. If the job is in "Running" status, you may need to wait for the job to end or may need to manually end the job before accessing the QPJOBLOG spooled file associated with that job. If the job is in "Completed - Job log pending" status, right click on the job, select Properties from the context or pop- up menu, click on the Job Log tab, select "Produce printer output for job log" and click on the OK button, then press the F5 key or select View > Refresh from the menu bar to refresh the System i Navigator window. The status of the job should change from "Completed - Job log pending" to "Completed - printer output available". Note: As an alternative, you can run the Change Job (CHGJOB) command from a display session to set the Job log output (LOGOUTPUT) parameter to *JOBEND. This will generate a QPJOBLOG spooled file for that job, which will cause the status of the job to change from "Completed - Job log pending" to "Completed - printer output available" after the System i Navigator window has been refreshed. Once the job is in "Completed - printer output available" status, right click on the job and select Printer Output from the context or pop- up menu to bring up a list of spooled files associated with that job. If necessary, double- click on the spooled files to display them using the AFP Workbench Viewer, or right- click the spooled file and select Properties from the context or pop- up menu, to verify that you have the correct spooled file. If the job or its spooled files are not found, try using the Basic Operations > Printer Output container. For more information, refer to the section entitled Finding a Spooled File in the Basic Operations > Printer Output container within System i Navigator above. Refer to the section entitled Copying the Text of a Spooled File to the PC below for information on copying the text of the spooled file to the PC. Finding a Spooled File in the Work Management > Output Queues container within System i Navigator. If running IBM i Access Windows, launch System i Navigator by clicking on its icon on the Desktop or by clicking on the Windows Start button, then selecting Programs, IBM i Access for Windows, IBM i. Series Access for Windows, or IBM AS4. Client Access Express, and then System i Navigator. Note: The Work Management > Output Queues container is available within System i Navigator within i. Series Access for Windows starting with version R5. However, is not available within Operations Navigator within either R5. R4. 50 Client Access Express for Windows. Click on the Plus Sign ("+" ) in front of the system where the spooled file is stored. Click on the Plus Sign ("+" ) in front of the Work Management container. Click on the Output Queues container. Look through the list of output queues shown, then double- click on the name of the output queue. Look through the list of spooled files for the selected output queue to see if contains the spooled file to be copied. IBM Using CPYSPLF to Re- Create a Spooled File or Create a PC File This document provides information on using the Copy Spooled File (CPYSPLF) command to re- create an operating system spooled file or create a PC text file. This document shows different uses of the Copy Spooled File(CPYSPLF) command including how to re- create a spooled file with different attributes or how to create a PC file from an existing spooled file. Notes: o. The CPYSPLF command can be used to copy *SCS and *LINE spooled files, those spooled files that are generated with the Printer device type (DEVTYPE) parameter set to *SCS or *LINE in the spooled file attributes; however, this does not work on *AFPDS or *USERASCII spooled files and may not work on *IPDS spooled files. Running the CPYSPLF command on *USERASCII spooled files will result in receiving message CPF3. File & 1 number & 7 cannot be displayed, copied, or sent" with reason code 3, which indicates that the spooled file "contains only ASCII data intended for a personal computer printer". Running the CPYSPLF command on *AFPDS spooled files will result in receiving message CPF3. AFPDS) data". In this case, the best option would be to copy the text of the *AFPDS spooled file to a PC using System i Navigator, using the instructions in the following document, if needed: N1. Copying the Text from a Spooled File Using System i Navigatorand then using FTP in ASCII mode to copy the data from the PC text file back to a physical file member. For more information, refer to Example 7: Copying the Data from an ASCII Text File on a PC Back to an Physical File Member Using FTP below. The CPYSPLF command also does not work with spooled files that have control characters and are generated with the Unprintable character action (RPLUNPRT) parameter set to *NO in the spooled file attributes. Starting in 7. 1 i. OS, the Copy Spooled File (CPYSPLF) command can be used to copy spooled files to a stream file in the Integrated File System (IFS). The spooled files can optionally be converted using a workstation customizing object, which allows the spooled file to be converted to other formats. To convert the spooled files to Portable Document Format (PDF), you must download and apply 7. PTF SI4. 34. 71 or a superseding PTF and you must also install licensed program 5. TS1, *BASE and Option 1, "IBM Transform Services for i" and "Transforms - AFP to PDF Transform". For more information, please refer to the following document: N1. New CPYSPLF function to copy SPLFs to Stream Files in the IFSas well as the following APAR and PTF cover letters: APAR SE4. OSP- PRT ENHANCEMENTS TO CPYSPLF COMMAND7. PTF SI4. 34. 71 This document was last updated on 2. October 2. 01. 4. Copying a Spooled File to a Physical File Member with First Character Form Control (FCFC) Information. The instructions in this section explain how to copy a spooled file to a physical file member with First Character Form Control (FCFC) information. There is an extra byte for storing the First Character Form Control (FCFC) information, which is used to preserve the line spacing and page breaks in the spooled file. Therefore this method should be used when you need to copy the text of the spooled file with the line and page breaks, and the CPYF command will be used with CTLCHAR(*FCFC) to interpret the FCFC controls (or when a program is available to interpret the FCFC control information instead). To copy the spooled file to a physical file member with the First Character Form Control (FCFC) information, do the following. First, you will need to create a physical file with a record length 1 greater than the record length of the spooled file. This extra byte will be used for a First Character Form Control (or FCFC) character which will preserve the line spacing and page breaks in the spooled file. To determine the record length of the spooled file, use either the Work with Output Queue(WRKOUTQ) or Work with Spooled Files(WRKSPLF) command and find the spooled file that you wish to copy. Press the F2. 1 (select assistance level) key and make sure that the assistance level is set to 2 (intermediate). Type option 8 (attributes) next to the spooled file and press the Enter key. This will take you to the Work with Spooled File Attributes screen. Use the Page Down key to scroll down 4 or 5 pages until you find the entry for Page size. If the intent is to copy a spooled file without modifying any of the data in the spooled file, then a physical file should be created using the Create Physical File (CRTPF) command. Look to see the value specified for the Width, then use one of the following CRTPF commands to create a physical file to store the data from the spooled files. If the page width is 1. CRTPF library/file_name RCDLEN(1. MAXMBRS(*NOMAX) SIZE(*NOMAX) LVLCHK(*NO)If the page width is 1. CRTPF library/file_name RCDLEN(1. MAXMBRS(*NOMAX) SIZE(*NOMAX) LVLCHK(*NO)Note: If copying text from a secondary language, you must use an externally described physical file created using SQL or Data Description Specifications (DDS), rather than using the Create Physical File (CRTPF) command. For more information on copying spooled files with a secondary CCSID, refer to the following Rochester Support Center knowledgebase document: N1. Data Transfer and CCSID 6. Database Files. 5b. If the intent is to copy a spooled file, modify the data in the spooled file, and then copy it back to a new spooled file, then a source physical file should be created using the Create Source Physical File (CRTSRCPF) command. That will allow the member to be edited using either the Start Source Entry Utility (STRSEU) or Work with Members Using PDM (WRKMBRPDM) commands. Look to see the value specified for the Width, then use one of the following CRTSRCPF commands to create a physical file to store the data from the spooled files. The source physical file should be created with a record length at least 1. First Character Form Control (FCFC) byte, but also the source sequence number (which contains 6 bytes) and the date (which contains 6 bytes) which exist on each line of text in the source physical file member. For example, if the page width is 1. CRTSRCPF FILE(library/source_physical_file) RCDLEN(1. If the page width is 1. CRTSRCPF FILE(library/source_physical_file) RCDLEN(2. Find out the job qualifier, file name, and spooled file number for this spooled file. This can be found by typing option 8 (attributes) next to the spooled file and pressing the Enter key. The job qualifier, file name, and spooled file number are shown at the top of the Work with Spooled File Attributes screen. Use the following Copy Spooled File (CPYSPLF) command to copy the data from the spooled file to the physical file: CPYSPLF FILE(spooled_file_name) JOB(number/user/job) TOFILE(library/file_name) TOMBR(member_name) MBROPT(*REPLACE) CTLCHAR(*FCFC)8. At this point, the spooled file has been copied to the physical file member. Once the spooled file has been copied to the physical file member you do several different things with it, including. Save it to media (for archives) or a save fileo. Restore it from media or a save fileo. Create a new spooled fileo. Create a new spooled file with different attributeso. Create a new spooled file after modifying the database membero. Create a PCFILE Typically, you will next follow the instructions in one of the following sections to copy the print data in the physical file member to a new spooled file. Example 1: Creating a New Spooled File with Different Attributeso. Example 2: Modifying the Physical File Member and Rewriting the Spooled File. Copying Several Spooled Files into a Single Physical File Member with First Character Form Control (FCFC) Information. The Copy Spooled File (. CPYSPLF) command can be used to copy several spooled files into a single physical file member by setting the Replace or add records (MBROPT) parameter to *ADD instead of using the default value of *REPLACE. The instructions in this section explain how to copy several spooled files to a single physical file member with First Character Form Control (FCFC) information. That physical file member can then be copied to a printer file to effectively combine several spooled files into single new spooled file. The physical file is created with an extra byte for storing the First Character Form Control (FCFC) information, which is used to record the line spacing and page breaks in the spooled file. The Copy Spooled File (. CPYSPLF) command must be used with CTLCHAR(*FCFC) to record the page breaks and line breaks, including the page breaks between each original spooled file, and the Copy File (. CPYF) command must also be used with CTLCHAR(*FCFC) to interpret the FCFC controls. To copy the spooled file to a physical file member with the First Character Form Control (FCFC) information, do the following. First, you will need to create a physical file with a record length 1 greater than the record length of the spooled file. This extra byte will be used for a First Character Form Control (or FCFC) character which will preserve the line spacing and page breaks in the spooled file. To determine the record length of the spooled file, use either the Work with Output Queue(WRKOUTQ) or Work with Spooled Files(WRKSPLF) command and find the spooled file that you wish to copy. Press the F2. 1 (select assistance level) key and make sure that the assistance level is set to 2 (intermediate). Type option 8 (attributes) next to the spooled file and press the Enter key. This will take you to the Work with Spooled File Attributes screen. Use the Page Down key to scroll down 4 or 5 pages until you find the entry for Page size. If the intent is to copy a spooled file without modifying any of the data in the spooled file, then a physical file should be created using the Create Physical File (CRTPF) command. Look to see the value specified for the Width, then use one of the following CRTPF commands to create a physical file to store the data from the spooled files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2017
Categories |