3 Replies Latest reply on May 22, 2006 6:02 AM by (Tom_Warfield)


    Level 1
      Hi,<br /><br />I am using PGCNTGET and PGCNTSET as follows:<br /><br />!f ACSTAT * acstat.mdf * 1 T PGCNTGET * * C *<br />!f ACSTAT * acstat.mdf * 1 T PGCNTSET * * C *<br /><br />!x PGCNTGET * jfmerge """@MDFName."" ""@InFile."" -afxon -l -axpson -apr""@PreambleName."" -all""@LogFileName."" -asl@SkipLines -amq@ManagedMem -ams""@MSTName."" -m@Macro#.@LoadFlag -zqueuename/File=NUL: -aii""@IniFileName.""" "Has Central retrieve the number of pages."<br />!x PGCNTSET * jfmerge """@MDFName."" ""@InFile."" -afxon -l -axpson -apr""@PreambleName."" -all""@LogFileName."" -asl@SkipLines -amq@ManagedMem -ams""@MSTName."" -m@Macro#.@LoadFlag -z""@PhysicalDev."" @PrintDirectorParms. @OtherJobTokens. -aii""@IniFileName."" -advglobal:pagecount=@NumberPages." "Has Central fill the PAGECOUNT field with the number of pages."<br /><br />Please see the -z option in the PGCNTGET.  I used -zqueuename/File=NUL:  and I also used -zNUL:.  Both give the following error:<br /><br />[3018]Error ending page on printer.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfserver.exe: [306]Processing file '6408.dat', '^job acstat -zASPHP -c1'.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfserver.exe: [307]Launching task 'C:\JetForm\Central\Bin\jfmerge "acstat.mdf" "C:\DATA\6408.dat" -afxon -l -axpson -apr"" -all"C:\LOG\jfserver.log" -asl1 -amq0 -ams"" -m1T -zqueuename/File=NUL: -aii"C:\JetForm\Central\Server\jfmerge.ini"'.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [125]* Processing data file: 'C:\DATA\6408.dat'.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [289]MDF file `C:\TEMPLATE\acstat.mdf' opened.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [400](1801) The printer name is invalid.<br /><br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [3015]Error, unable to open printer.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [3008]Error, unable to get info about device 'queuename' attached to port '<nil>'.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [400](183) Cannot create a file when that file already exists.<br /><br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [2]Error opening output device/file 'queuename/File=NUL:'.<br />2006/05/18 13:14:34 C:\JetForm\Central\Bin\jfmerge: [400](6) The handle is invalid.<br /><br />If I don't specify any -z option at all for PGCNTGET or if I specify -z""@PhysicalDev."", I get two copies of the same printout.<br /><br />Please help in solving this problem.
        • 1. Re: PGCNTGET and PGCNTSET tasks
          Level 1
          I suspect that your duplicate print is caused by either specifying the printer or by defaulting the printer for
          b both
          tasks. Not specifying the -z parameter tells the print agent to send the print to the default printer selected within the form using Output Designer. As I'm sure you are aware, what you want to do is not create any print for the PGCNTGET task while doing so for the PGCNTSET task.

          Your error is caused because you are specifying the
          b -zqueuename/File=XXXXXXXXX
          parameter incorrectly.

          I don't know if you can use
          b NUL:
          for the file name so I won't address that part of the parameter. (But if the operating system doesn't recognize it, then that could be causing the error.) What
          i is
          obvious to me is the
          b queuename
          part of the parameter. The
          b queuename
          that you see in the manual is present as a label or placeholder only. It is not meant to be there as a literal value. You have to replace
          b queuename
          with the name of an actual print queue defined on the server. For example, if you want to send the print to a queue with a name of
          b HP9050
          you would replace "queuename" within the parameter with "HP9050" so that it would look like:
          b -zHP9050/File=XXXXXXXXX

          Assuming that NUL: is valid in this format, and with my understanding of what NUL: would do, then the result would be no printed output. If that is what you really want, then the sample PGCNTGET task that comes with Central uses:
          b -zNUL:
          (but that might not be valid for the operating system).

          The format you are using is intended to place a file with the specified name in the named queue. I don't think that is what you want.

          What I do when I don't want any printed output is to use the parameter
          b -zNULL
          which results with a file named "NULL" in the "collector" folder (where the data files are placed for processing by Central). I know that I can safely ignore or delete this file without affecting anything. If you don't want it in the collector directory I believe that you can specify the path to where you want it placed.
          • 2. Re: PGCNTGET and PGCNTSET tasks
            Level 1
            Hello Tom,

            Thanks for your detailed message. I am still no good in jetform and is simply going by examples and trial-and-errors. You're right, I don't want to print twice - and that is exactly the problem I am trying to resolve.

            -zNULL in your last paragraph might be the approach I am going to take to temporary fix this problem. Thanks for the hint.

            Jetform central is running in Windows2000 server. And I hope -zNUL: is supported for this OS. However, it did not work.

            Is the queuename same as the printer name in the Start->Settings->printers folder? For example, I have a printer defined as 'FX Document Centre 285 PCL 6'. So, will the -z option be -zFX Document Centre 285 PCL 6/NUL: in this case?
            • 3. Re: PGCNTGET and PGCNTSET tasks
              Level 1
              The queuename is the name as it is defined within Central; not the name it is known to Windows. Using the Central Control program (on the server) it would be the name defined within
              b File->Job Management Database->Printers...

              This would be where you would give the "logical" printer name that was associated with the physical printer defined within Windows.