Record in file QSYSPRT truncated at end of line.

I keep getting "Record in file QSYSPRT truncated at end of line."  after I change date format -- I change it from 6 to 8 digits. Even I change it back, I'm still getting this "Record in file QSYSPRT truncated at end of line." and it doesn't seem to give me any output.
I'm stuck. Please help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


I suspect that the position of the date on the output is either at the right or is pushing other fields to the right. The width of the print-line is enough to hold everything until the date grows.

You tagged this with "RPGLE", so I have to guess that you have a RPGLE program that's trying to print output using the QSYSPRT *PRTF. Generally, you don't want programs using system printer files. You have no control over what happens to them during upgrades or when applying PTFs.

Much better would be to create your own *PRTFs, either by coding them and compiling or by CRTDUPOBJ. Once you've created your own, you can much more easily make changes to their attributes without affecting other programs. If 100 programs are using QSYSPRT, then changing QSYSPRT affects them all.

In this case, you _might_ get by with a print-file override before calling the program:

 ==>  ovrprtf  QSYSPRT  pagesize( *n 134 ) [ ovrscope( *JOB ) ]
 ==>  call  yourlib/yourpgm
 ==>  dltovr  QSYSPRT

You'd try setting QSYSPRT to be a couple characters wider. I don't know how your program is created, so I don't know if it runs in a different activation group of its own. You might need to add the OVRSCOPE() parameter to cover the whole job if the override command can't be put into the same activation group. The DLTOVR command might also need a similar OVRSCOPE() parameter.

Be aware that widening the printer file can affect how the report is handled by any printers. The printed output might be wider than the printer can handle without also changing characters-per-inch on the override or changing other attributes.

Also, you might need to have the override in effect in the job that compiles your program. (I haven't tried this type of widening.)

IMO, your best choice is simply to create a different printer-file, set its attributes the way you need them, change the program to reference the new printer-file instead of QSYSPRT, and skip any overrides.

jingyizouAuthor Commented:
Hi Tliotta,
Nice to meet you here again!
I apologize not giving enough information.
This is rpgle progam written by someone else.  See qsysprt related code below

 Columns . . . :    6  76           Browse                    
 SEU==>                                                               CITI
 FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++
0017.00 Ff0111     if   e           k disk                                      
0018.00 Fcitidlz   o  a e             disk                                      
0019.00 F**asehd   o  a e             disk                                      
0020.00 Fqsysprt   o    f  160        printer formlen(51)                      
0021.00 F                                     oflind(*inof)                    
0022.00 F                                     formofl(50)                      
0023.00 Djdays            S              3  0 DIM(12)                          
0024.00 Dmytime           S               T   TIMFMT(*HMS:)                    
0025.00 Dmyts             S               Z                                    
0026.00 C     *ENTRY        PLIST                                              
0027.00 C                   PARM                    bat1             10        
0028.00 C*                                                                      
0029.00 C                   time                    mytime                      
0030.00 C*Main Loop -----------------------------------------------------------
0031.00 C     *in01         doueq     '1'                                      
0032.00 C                   read      f0413lct                               01
0033.00 C     *in01         ifeq      '0'                                      
 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel      
 F16=Repeat find        F24=More keys                    

 Columns . . . :    6  76           Browse                    GENERAL/QRPGLESRC
 SEU==>                                                               CITI010RZ
 FMT C  CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq
0267.00 O****************************************************************      
0268.00 O*  O U T P U T   S P E C S                                            
0269.00 o***************************************************************        
0270.00 Oqsysprt   e            head1          1  1                            
0271.00 O                                           10 'Citi'              
 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel      
 F16=Repeat find        F24=More keys                  

 Columns . . . :    6  76           Browse                    GENERAL/QRPGLESRC
 SEU==>                                                               CITI010RZ
 FMT P  O..............N01N02N03Field+++++++++YB.End++PConstant/editword/DTform
0272.00 O                       svbank        4     28                          
0273.00 O                                           50 'Build Citi    '        
0274.00 O                                           63 '  Upload File'          
0275.00 O                       udate         Y     90                          
0276.00 O                       mytime             105                          
0277.00 O          e            head1          1                                
0278.00 O**                     mystamp             30                          
0279.00 O                                           49 'Batch:'                
0280.00 O                       bat1                60                          
0281.00 O          e            head1          0                                
0282.00 O                                           50 ' '                      
0283.00 O          e            head1          2                                
0284.00 O                                           50 ' '                      
0285.00 O          e            head1          2                                
0286.00 O                                            7 'Check#'                
0287.00 O                                           25 'Amount'                
0288.00 O                                           38 'Payee      '            
 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel      
 F16=Repeat find        F24=More keys                                          
 Columns . . . :    6  76           Browse                    GENERAL/QRPGLESRC
 SEU==>                                                               CITI010RZ
 FMT P  O..............N01N02N03Field+++++++++YB.End++PConstant/editword/DTform
0289.00 O                                          110 'Ind.'                  
0290.00 O                                          115 'Date'                  
0291.00 O          ef           detl1          2                                
0292.00 O                       cicssn        4     10                          
0293.00 O                       cicamt        J     27                          
0294.00 O                       cipay1             107                          
0295.00 O                       ciind              108                          
0296.00 O                       cicdat        Y    119                          
0297.00 O*                                          99 '('                      
0298.00 O*                      rmdmtj        4    105                          
0299.00 O*                                         106 ')'                      
0300.00 O          e            totl1       1  2                                
0301.00 O                                           22 'Totals:'                
        O                       itcnt         4     30                          
        O                                           44 '# of Checks'            
0304.00 O                       itamt         J     68                          
        ****************** End of data ****************************************
 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel      
 F16=Repeat find        F24=More keys                                          
Cicdat is the date format I need change. It was 6 digits before,  we changed it to 8. After we did this, there is no output.
I hope this help.

jingyizouAuthor Commented:
Here is some update:
when I run the rpg program B by typing the following comand , I'm able to get qsysprt output.
However, the rpg program is called by a cl program A. If I call A, then there is no output
A simplely calls B.

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.


That confuses everything... :-)

But it also provides an opportunity to find a clue. PgmA must be having an effect. If PgmA has any references to printers, printer files, overrides or anything else that seems related, it can be a direct clue. Note that the reference might come after the call to PgmB.

Looking at the code you provided hasn't brought any thoughts to mind. The RPG looks fine. I haven't studied in detail, so lots might be missed by me for now.

However, it now seems that the real place to look is in PgmA.

Is there a duplicate of QSYSPRT on your system? Does PgmA provide an override to point the open of QSYSPRT to a different printer file? (Does PgmB run in a different activation group?)

jingyizouAuthor Commented:

This is source code for Pgm A

 Columns . . . :    1  71           Browse                       GENERAL/QCLSRC
 SEU==>                                                                 CITI002
 FMT **  ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7  
0017.00              ADDPFM     FILE(QGPL/CITIDLZ) MBR(&BAT1) TEXT('Citi +      
0018.00                           Checks Details')                              
0019.00           /* SNDMSG   MSG('TEST') TOUSR(GCSSUPPORT) */                  
0021.00             OVRDBF     FILE(CITIDLZ) TOFILE(QGPL/CITIDLZ) MBR(&BAT1)    
0022.00         /*   OVRDBF                                                  */
0023.00 /*           OVRPRTF    FILE(QSYSPRT) TOFILE(QSYSPRT) OUTQ(CITI) +  */  
0024.00 /*                        SAVE(*NO)                                 */  
0025.00             CALL       PGM(GENERAL/CITI010RZ) PARM(&BAT1)              
0028.00                         L) FROMMBR(CITIDOWNP) TOMBR(CITIDOWNL) +        
0029.00                          MBROPT(*REPLACE)                              
0030.00              MONMSG     MSGID(CPF0000 CPF9999 CPF2869 CPF2817)          
0031.00              CLRPFM     FILE(QGPL/CITIDOWNP)                            
0033.00                           FROMMBR(&BAT1) TOMBR(CITIDOWNP)   +          
 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel      
 F16=Repeat find        F24=More keys      

It calls Pgm B which is Citi010RZ

If I run   CALL       PGM(GENERAL/CITI010RZ) PARM(C010101) (any parameter) I can get output in citi output queue

however if run call A Parm(C010101), nothing in output queue. It's so weird?

Are you getting the records that you expect in QGPL/CITIDLZ member &BAT1?

jingyizouAuthor Commented:
yes I did get expected records in qgpl/citidlz
(That should be understood to mean that the correct records appear when PgmA calls PgmB.)

The "obvious" question now is whether the output is going to a different output queue and not the CITI *outq. But the CL has the override commented out. Calling PgmB as a standalone should send the output to the same place that PgmA would send it.

If calling PgmB directly works, then PgmB is not the problem. It _must_ be an environment issue that is affected by PgmA. When you call PgmA, are you calling from the same command line or using the same job description and profile?

It could be that PgmA affects the library list at some point before line 0017.00. It could be that PgmA affects authorities. (Technically, PgmA could even delete the spooled before it ends.) It could be...?

Do you run with *PRTDTA and/or *SPLFDTA in your QAUDLVL system value and have auditing active? Do you run job accounting for printer activity? Either of those journals could show useful hints for the jobs that call either PgmA or PgmB.

Naturally, the joblog for calls to those programs might also show useful info.

I'll think on it and post ideas if any arise. So far, with the info shown, it's not making much sense. Hopefully, someone else can add thoughts.

jingyizouAuthor Commented:
Thank you for the information.
All of sudden, I can't get output from both --neither from call pgm A nor B.  I've been gettng Record in file QSYSPRT truncated at end of line message and no output file in output queue.
I can't explain why calling pgm B from command line worked before. No change has been made. Anyway, it sounds like Record in file QSYSPRT truncated at end of line is the issue. Any easy fix for this.
Is it like a flat file? Did you check the record length of both files, you do a copy file from... to... are they both the same length and do you use separeted fields?
or do you mean that for only 1 field the info is truncated?
jingyizouAuthor Commented:
Here is the problem.
PGM-A (CLP) call PGM-B(RPG).
record length is 160, Prints report file. Run PGM alone in command line and run PGM A both give CPF4906
"Record in file QSYSPRT truncated at end of line."  message.
Very surprise, please help

1. Are there multiple copies of QSYSPRT on your system? Use:

 ==>  wrkobj  *all/QSYSPRT see a list of all objects named QSYSPRT. Make sure that there aren't other file objects with that name in the library list when PgmB is called. You want to be sure you use the appropriate QSYSPRT.

2. What version of i5/OS (or OS/400) is running? Has there been an upgrade since PgmA or PgmB was last compiled? Note that PTF dates might also be involved, so running DSPPTF to an *OUTFILE for queries might be useful in checking PTF status dates.

3. What dates are on the QSYSPRT *FILE object? You want to check creation date, restore date and possibly change date. Perhaps a recent PTF changed the QSYSPRT definition. I know that QSYSPRT was changed by IBM a few releases back, but I don't know that the change would make a difference. If you're running an older release of OS/400 and the last upgrade was after PgmB (or PgmA) was previously compiled, it might make a difference.

4. Has PgmA calling PgmB worked correctly in production in the past? I know you started this question saying that the change from a 6- to an 8-digit date brought the problem to light, but it wasn't clear what the history was.

jingyizouAuthor Commented:

wrkobj *all/qsysprt

                               Work with Objects                                
 Type options, press Enter.                                                    
   2=Edit authority        3=Copy   4=Delete   5=Display authority   7=Rename  
   8=Display description   13=Change description                                
 Opt  Object      Type      Library     Attribute   Text                        
      QSYSPRT     *FILE     ADTSLAB     PF                                      
      QSYSPRT     *FILE     QGPL        PF                                      
      QSYSPRT     *FILE     QSYS        PRTF        System non-described printe
they are differen attribute, I assume pgm should use the one in qsys lib which has PRTF attribute.                                                                              
2) V5R3 I spoke to their AS/400 admin. today and she did apply some ptfs recently.
4) It worked correctly before. I changed back date format and still cannot get spool file in the output queue.
I agree with you it has something do with the new PTFs. Is there any way we can fix it?
Can you check the PRTF it self to see what the length of the record is, probably set to something like 80, you need to change it to 133 or something like that. Standard is like 80 wide I believe. I often had a similar thing. You
try this:
Change Printer File (CHGPRTF)
PAGESIZE Page size Element list Optional
Element 1: Length--lines per page 0.001-255.0, *SAME
Element 2: Width--positions per line 0.001-378.0, *SAME
Element 3: Measurement method *SAME, *ROWCOL, *UOM
Or check the AS400 RPG site of IBM:

The "extended attribute" is actually more of a comment and can be wrong. It isn't technically part of the 30-character object name -- library/object/object-type -- in the QSYS.LIB file system. However, QSYS will almost certainly be ahead of QGPL in any library list; and it seems very unlikely that any production override would direct output to a physical file when you're expecting it to end up on an output queue. (Possible, though, so cannot be discarded.) It's near certain that QSYS/QSYSPRT will be selected.

That brings the possibility that QSYSPRT has changed since the program was first compiled. Normally, I'd expect that the program would throw an error as soon as it ran for the first time after a change to QSYSPRT if an error was going to appear. A recompile shouldn't cause this, AFAIK.

However, I am a little surprised that some error didn't show up anyway, perhaps at compile-time. QSYSPRT is normally only 132-characters wide. The RPG opens it as 160 wide. Maybe that's no problem since there are no O-specs that show columns past 132. But that raises a question of why the program is at 160 in the first place. Without an override, there's no way for anything past 132 to get into the spooled file.

And that makes me wonder if another override is not being shown or an override is missing from PgmA.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
you can get past 132 you can put it at 200 if you like, limit is 255 i believe.

Yes, you can get past 132 if the printer file has a pagewidth that's greater than 132; but QSYSPRT normally has 132 specified. Without an override to allow it to be larger, anything beyond 132 will be 'truncated'. The general thread in this question is to determine if any overrides are in effect and what those overrides might be. So far, the code that's been posted hasn't shown any active overrides.

It might be useful to have PgmB execute a DSPJOB OUTPUT(*PRINT) OPTION(*FILOVR) command to print overrides that are in effect when the program runs.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.