Problem solve Get help with specific problems with your technologies, process and projects.

Change report info without running the program again

Learn how to change report info without rerunning the program.

Has there ever been a time when you wished you could change information on a report without having to run the program again?

Well wish no more! By following these seven steps, you can have that report changed in minutes. Here's what you do:

1. Create a PF with a record length of 133 (132 + 1 the first byte must contain the control character)
Example: CRTPF FILE(&LIB/&NAME) RCDLEN(133)

2. Copy spoolfile with control character value *FCFC.
Example: CPYSPLF FILE(spoolfile name)
TOFILE(&LIB/&NAME)
JOB(number/user/job)
SPLNBR(file number) CTLCHAR(*FCFC)

3. Verify that the file was copied properly. (optional)
Example: DSPPFM FILE(&LIB/&NAME)

4. Create an RPG/CLP program to update the &NAME.

5. Verify that the file updated properly. (optional)
Example: DSPPFM FILE(&LIB/&NAME)

6. Override printer file statement MUST be used before copying physical file to spool file. You can enter the override statement on the command line.
Example: OVRPRTF FILE(QSYSPRT) this is the name of my print file.

 
                                                     PAGESIZE(**)  **use
66=letter, 18=labels
                                                     LPI(6)
                                                     OVRFLW(12)         used
if form is labels, else disregard the parm
                                                     CTLCHAR(*FCFC)
                                                     PAGRTT(0)
used if letter is printed on laser, else disregard.
                                                     PRTTXT(*BLANK) used so
spool file will not contain the current
 
user's 'FOOT'.
                                                     MAXRCDS(**)     ** use
*NOMAX 
      7.  Copy PF to spoolfile.
                          Example:  CPYF FROMFILE(&LIB/&NAME)
TOFILE(QSYSPRT) 

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Dig Deeper on iSeries ILE programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close