IPDS printer prints 2 copies of barcode page

3890 pts.
Tags:
AS/400
AS/400 printing
AS/400 Spool Files
IPDS
We have a homegrown program that prints a barcoded (6 0f 9) page. I have ran tests and the spool file has only one page of data and is set to 1 copy. When we send the report to an IPDS printer (HP-4050) it prints two copies. Why should it do this? All other reports sent to this printer are normal. The program uses a prtf.

Answer Wiki

Thanks. We'll let you know when a new response is added.

buy a new one

————————————————————————————————–

You make a mistake assuming the printer is at fault.

Discuss This Question: 20  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Splat
    I would say to check the print file definition to see if COPIES is set to 2 but that should show in the output queue entry. 

    Is this happening on any other output being sent to that printer?  If so I'd say to check the device description.
    12,650 pointsBadges:
    report
  • azohawk
    I checked the prtf, and I looked at the device description and don't see anything. Lots of different types of documents get sent to this printer, but this is the only one that prints two copies.
    3,890 pointsBadges:
    report
  • Splat
    Have you caught it in the output queue before it's printed to check the number of copies?  The number of copies reduces to one once the spool file has been printed.

    Also, have you looked for any overrides that might be put in place by the program?
    12,650 pointsBadges:
    report
  • azohawk
    It actually has to be moved from a dummy outq to an outq attached to a printer. I looked at it before it was moved. No overrides.
    3,890 pointsBadges:
    report
  • Splat
    Is the 2nd page that prints a duplicate of the 1st, or is the 2nd page more overflow. 

    It's been a while since I've done anything with IPDS (AFPDS supports barcodes & doesn't require special printers or interfaces) but it may have to do with the page definition.

    Would you be able to post your DDS?
    12,650 pointsBadges:
    report
  • azohawk

    I looked at the last line of the spoolfile before printing, it indicate page 1, line 31. When printed, 2 identical pages printed.  Copies on the spoolfile were set 1.

    DDS for the PRTF:

         A*
         A*   CRTPRTF AS *IPDS
         A*         LENGTH  66
         A*         WIDTH   80
         A                                      REF(REFERENCE)
         A          R HEADER                    SKIPB(003)
         A                                     1
         A                                      'BAR013'
         A                                    +5
         A                                      'Manufacturing Order: IP & RM'
         A                                    +5
         A                                      'Page'
         A                                    +1
         A  30                                  PAGNBR
         A                                      EDTCDE(Z)
         A                                    65
         A                                      'Date'
         A
         A            TODAYP         8  0     70
         A                                      EDTWRD('  /  /    ')
         A                                      SPACEA(001)
         A                                     5
         A                                      'Order'
         A                                    14
         A                                      'Item Number'
         A                                    30
         A                                      'Sequence'
         A                                    40
         A                                      'Open Qty'
         A                                    51
         A                                      'Turnaround Number'
         A                                      SPACEA(001)
         A*%%***********************************************************************
         A          R DETL1                     SPACEB(001)
         A*%%***********************************************************************
         A                                     1'--------------------'
         A                                    +0'--------------------'
         A                                    +0'--------------------'
         A                                    +0'--------------------'
         A                                      SPACEA(001)
         A                                     1'RM:'
         A            ORDNO          7A  O     5
         A            FITEM         15A  O    14
         A            OPEN           7S 0O    40
         A                                      EDTCDE(J)
         A            TURN           9        51BARCODE(CODE3OF9 4 )
         A                                      SPACEA(1)
         A            FDESC         30A  O    14
         A                                      SPACEA(6)
         A*%%***********************************************************************
         A          R DETL1A                    SPACEB(001)
         A*%%***********************************************************************
         A                                     1'--------------------'
         A                                    +0'--------------------'
         A                                    +0'--------------------'
         A                                    +0'--------------------'
         A                                      SPACEA(001)
         A                                     1'IP:'
         A            ORDNO          7A  O     5
         A            CITEM         15A  O    14
         A            USRSQ          4A  O    32
         A            OPEN           7S 0O    40
         A                                      EDTCDE(J)
         A            TURN           9        51BARCODE(CODE3OF9 4 )
         A                                      SPACEA(1)
         A            CDESC         30A  O    14
         A                                      SPACEA(6)
         A*%%***********************************************************************
         A          R DETL2                     SPACEB(1)
         A*%%***********************************************************************
         A                                     3
         A                                      'Locations:'
         A                                    15
         A                                      'Qty'
         A            QTY1           7S 0O    +1
         A                                      EDTCDE(M)
         A                                    +1
         A                                      'in'
         A N62                                38
         A                                      'Qty'
         A N62        QTY2           7S 0O    +1
         A                                      EDTCDE(M)
         A N62                                +1
         A                                      'in'
         A N63                                61
         A                                             'Qty'
         A N63        QTY3           7S 0O    +1
         A                                               EDTCDE(M)
         A N63                                    +1
         A                                                'in'
         A                                            +1
         A                                                 ' '
         A                                                 SPACEA(1)
         A               LOC1           7        15BARCODE(CODE3OF9 4 )
         A N62        LOC2           7        38BARCODE(CODE3OF9 4 )
         A N63        LOC3           7        61BARCODE(CODE3OF9 4 )
         A                                    +1
         A                                      ' '
         A                                      SPACEA(5)
         A*%%***********************************************************************

    3,890 pointsBadges:
    report
  • Splat
    I don't see a thing in the DDS that stands out as a problem.

    I should have asked this earlier - does this happen on any other printer?
    12,650 pointsBadges:
    report
  • azohawk

    We have 1 other IPDS printer, and the same thing happens when printing to that printer with this document.  I have not been able to get this document to print on any other printer. Consequently, I am stumped on this one. Dozens of different iSeries documents are sent to these printers and this is the only one (that I am aware of) that does not print "normal".

    3,890 pointsBadges:
    report
  • Splat
    Are the other iSeries documents specified as *IPDS?
    12,650 pointsBadges:
    report
  • azohawk

    In the case of this specific program. The user takes a menu option that activates a CL program. The CL program presents the user with a dspf asking for two values, a)order no.  b) user sort (Y or N).  If the user selects N, program BAR12 is called: if they select Y,program Bar13 (the problem child) is called.  I ran the program taking both options- the N option (BAR12) printed 1 page, while Y (BAR13) printed 2 pages.  Looking at the code:

    BAR12-- PRTF: does not contain 1 field the BAR13 does (a sequence number that prints as text).  RPG: has a field call PAGECOUNT that seems to track the number of rows printed to determine a full page.

    BAR12-- PRTF: has 1 row of the detail data and barcodes printing 5 spaces to the right of where the print on BAR12.   RPG: uses a different logical on one file.

    Otherwise both programs and printer files look almost identical, in fact based on the dates, it appears one is a copy of the other with a minor changes.

    The results prints locations of the items. BAR12 produced 1 additional location in the example I printed and the right most barcode location appears to be missing a single bar compared to the same location on BAR13 (even though BAR13 is 5 characters to the right).  Looking at the spoolfile, both were *IPDS files, single copy.  BAR12 had more lines (probably related to the extra location that did print on the next row.) Displayed both PRTF and they look identical.  I did see that when I released them to the printer, BAR12 went lickity split to the write status and printed. BAR13 went into a pending status for about 90 seconds before moving to write status and printing.

    3,890 pointsBadges:
    report
  • azohawk

    BAR12 User Buffer length = 68  BAR13=72

    Otherwise the settings are the same. File and 3 of the 4 record level identifiers are even the same.

    3,890 pointsBadges:
    report
  • Splat
    I wonder if the buffer length may be part of the issue, causing some sort of overflow condition.   Can you increase the buffer length in a test area & see if that has any effect on the duplication?
    12,650 pointsBadges:
    report
  • azohawk

    Splat,  I wasn't able to get the buffer size to change. However: I did try moving the variant line 5 charcters to the left to align w/ the other prtf. That actually seemed to work. That line can potentially have 3 columns of barcodes, with the alignment set 5 characters to the right the right most barcode was being truncated.  But with the left alignment, I get 1 copy.

    I am guessing that with the barcode being truncated the writer was trying to figure out  what to do w/ the truncated barcode and resubmitting the page.

    Thanks for your assistance. It made dig into this in a little different direction that led me to the solution. Thank you.

    3,890 pointsBadges:
    report
  • Splat
    azohawk, glad to be of assistance.
    12,650 pointsBadges:
    report
  • proalamouroux
    Hi guys, anyone could help me to solve this issue?
    We have two printers "Canon iR-ADV C5235/5240" with the same settings and we normally print reports from AS400 but now all documents that we send to one of the printers came twice (2 pages) and the other one came normal (1 page). Both of them have as copies settings just 1. So, what is wrong? 

    40 pointsBadges:
    report
  • Splat
    proalamouroux, you might want to open this as a separate item rather than letting it get buried in this thread.

    My first question would be if either the device definition or the printer configuration has changed on one or the other printer?
    12,650 pointsBadges:
    report
  • proalamouroux
    Hi Splat. Thanks for reply.

    Yes, we did a change in that printer exactly before it starts to work inappropriate but that change was basically make the printer print automatically a job from AS400 in letter paper size as the users needed it without ask anything to them (because all jobs in AS400 are for default in A4 paper size) so to print in another paper size, the print doesn't do it automatically. It was the only change we did. 
    All the settings for both printers are exactly the same.
    40 pointsBadges:
    report
  • proalamouroux
    We did some more tests and we identified that the problem is in the queue1. So we delete that queue1 and create it again in base to the queue2 (which is working properly), but then we did the same tests and the problem is still happening with queue1.
    40 pointsBadges:
    report
  • Splat
    A4 is larger than 8.5x11.

    If you've changed your printer to use 8.5x11 paper but the print file is generated for A4 it seems likely that you've an overflow problem.
    12,650 pointsBadges:
    report
  • ToddN2000
    @proalamouroux, is anything printing on the second page or is it blank? If it it blank it's most likely an overflow like Splat mentioned. Try his suggestions and if a problem still persists, open another question with with details on what is printing on both pages.
    114,985 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: