ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Brainstorming ideas regarding .ps files currently saved in IFS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Brainstorming ideas regarding .ps files currently saved in IFS

    I'm just looking for thoughts about this situation: We have some products that get a "pretty" label. This label is designed by marketing and saved as a .ps file. In our programming, we look for the correct file in the IFS and send that huge .ps file to the printer. Naturally, the users are complaining that it takes too long to print. I'm working on designing a proof of concept where we would save the files on a server local to the printer. Our program would then send a remote command to print the label.

    Today, we can issue a message to the user if we can't find the file. If we switch to using a remote command, we lose that and have to add a programmer who can write the code for the server side to print the label (JAVA, SQL, whatever).

    Has anyone ever run into something like this? Do you know of a cleaner solution? Our network is pretty fast, but the .ps files are so large, and we print so many labels, that it's just too much to be fast enough for the plant.

    Thank you in advance for any thoughts.
    Have a great day!

  • #2
    Originally posted by MelissaG View Post
    Naturally, the users are complaining that it takes too long to print. I'm working on designing a proof of concept where we would save the files on a server local to the printer.
    I'm not sure that I understand the premise, here. Why would another server be faster than the one it's stored on now? Is that server on a different/faster network? You say "Naturally" here as if you think it's obvious... but it's not obvious to me.

    Originally posted by MelissaG View Post
    Our program would then send a remote command to print the label.
    Not sure what you mean by "remote command", here? Do you mean something like rexec? Or...? Wouldn't it make more sense to use a REST API? Why are you sending a remote command instead of having software running on that server that sends the file to the printer?

    Originally posted by MelissaG View Post
    Today, we can issue a message to the user if we can't find the file. If we switch to using a remote command, we lose that and have to add a programmer who can write the code for the server side to print the label (JAVA, SQL, whatever).
    I'm not following this -- why can't you have a message if the file can't be found? It sounds like you're planning to have custom software written to run on the server. Why can't that software detect a missing file and send a message back?

    Originally posted by MelissaG View Post
    Has anyone ever run into something like this? Do you know of a cleaner solution? Our network is pretty fast, but the .ps files are so large, and we print so many labels, that it's just too much to be fast enough for the plant.
    Maybe? I don't really understand your scenario.

    I had a situation where I needed to modify labels sent to label printers, and it was fairly complex, so I had a background process that would synchronize the label formats. Any time someone changed a label on the IBM i, a trigger would be used to send the updated label format to all the remote PCs. On the PC was software that interpreted the label format and found where various things needed to be replaced. It would then load the format into the printer, and send the replacement values as needed (while keeping the format the same). This was very fast, whereas loading the whole format would be slow.

    I can't tell if that's a similar situation to yours or not, I don't really understand what your challenges are.

    Comment


    • #3
      Just a thought.
      You are writing that it is a huge file. But is it a huge image that is scaled down when printing?
      If your designers could scale it down then the size will decrease much I assume.


      Comment


      • #4
        Well, let me try this again. First, though I'd like to say that our network guy is updating some hardware, and we hope that helps.

        The process is this -- they use an RF scanner to pack scan a product. That program checks to see if an "EZ Read" label needs to be printed. If it does, and it is available, we send this command that takes the postscript file from the IFS and prints it. **I do not entirely understand this command ***

        PHP Code:
         CHGVAR VAR(&QSHCMDVALUE('cat -c ' *CAT +
        %
        TRIM(&PSFILE) *CAT ' | Rfile -wbQ -c +
        "ovrprtf file(qprint) devtype(*userascii) +
        splfname(pdfprt) hold(*yes)" -C "lpr +
        rmtsys(''' 
        *CAT %TRIM(&PRINTER) *CAT ''') +
        prtq(test) file(pdfprt)" qprint'
        )

        STRQSH CMD(&QSHCMD


        I've been told that it takes up to 4 minutes for the label to print. We don't know if that is from the time they scan to the time it starts to print or the time it finishes printing.

        I guess what we were talking about was finding a way to get the .ps files closer to the printer instead of having to send them across the network. I don't understand networking, but we have multiple layers of hardware between the ISeries server and the printer which may be the entire problem.

        I appreciate your attempt to understand my ramblings!

        Comment


        • #5
          First you should find out where exactly is the bottleneck. Otherwise it can happen that you only shift the problem to another place.

          Comment


          • #6
            This may be a timeout issue where the LPD is waiting for additional data before eventually timing out and then printing the file. After the file is sent use NETSTAT to check if the connection is waiting to close.

            Adding a form feed to the end of the file might cause the label to print although the daemon will still wait for additional data and timeout.​

            Comment

            Working...
            X