Trying to use an ags call to update a batch job so it routes the print job to a distrbution group.

 8 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Toby
Basic Member
Posts: 5
Basic Member

    I have a batch job that is being executed from ProcessFlow. I need to route the print jobs to a printer distribution group. When I try and update the RPT-FLD parameters within the ags call the ags will say the update was complete but the distribution group does not get added.  Below is the ags call I am using:

    _PDL=&_TKN=SPR03&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&JOB-NAME=&JOB-DESCRIPTION=SPR03A&USER-NAME=&RPT-FLD14=Dist Group&RPT-FLD15=&COMPANY=&PROC-GROUP=&CHECK-DATE=&PER-END-DATE=&DED-CYCLE=&RERUN-OPTION=&SPR03-RUN=A&_DELIM=%09&_OUT=XML&_EOT=TRUE

    RPT-FLD14 and RPT-FLD15 are the fields that correspond to the "Destination" and "Printer/Group" parameters.

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      You are missing a Product Line reference in your AGS call. Should it be set to GEN?
      David Williams
      Toby
      Basic Member
      Posts: 5
      Basic Member

        Hey Dave,

        I am not sure why the product line was not there when I did the cut and past but it is in the ags. Here it is again:

        Transaction Call String _PDL=DEV&_TKN=SPR03&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&JOB-NAME=SR03X0912A&JOB-DESCRIPTION=SPR03A&USER-NAME=tcurry&RPT-FLD14=Dist+Group&RPT-FLD15=PF-TEST&COMPANY=1000&PROC-GROUP=UMX&CHECK-DATE=20090612&PER-END-DATE=20090606&DED-CYCLE=1&RERUN-OPTION=N&SPR03-RUN=A&_DELIM=%2509&_OUT=XML&_EOT=TRUE%0D%0A

        Gary Davies
        Veteran Member
        Posts: 248
        Veteran Member

          Try

          &RPT-FLD14=Dist%20Group&RPT-FLD15=PF%45TEST

          Toby
          Basic Member
          Posts: 5
          Basic Member
            Gary,

            It did the same thing.

            Here is the ags and the first lines of the result:

            Transaction Call String _PDL=DEV&_TKN=SPR03&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&JOB-NAME=SR03X0912A&JOB-DESCRIPTION=SPR03A&USER-NAME=tcurry&RPT-FLD14=Dist%2520Group&RPT-FLD15=PF%2545TEST&COMPANY=1000&PROC-GROUP=UMX&CHECK-DATE=20090612&PER-END-DATE=20090606&DED-CYCLE=1&RERUN-OPTION=N&SPR03-RUN=A&_DELIM=%2509&_OUT=XML&_EOT=TRUE%0D%0A
            SPR03AC_RPT_FLD2 =
            SPR03AC_SUBMIT = Submit
            SPR03AC_REPORTS = Reports
            SPR03AC_JOB_SCHEDULER = Job Sched
            SPR03AC_PRINT_MANAGER = Print Mgr
            SPR03AC_JOB_NAME = SR03X0912A
            SPR03AC_JOB_DESCRIPTION = SPR03A
            SPR03AC_USER_NAME = tcurry
            SPR03AC_LONG_NAME = Toby Curry
            SPR03AC_PRODUCT_LINE = DEV
            SPR03AC_RPT_FLD12 = 1
            SPR03AC_RPT_FLD13 = SPR03.prt
            SPR03AC_RPT_FLD14 = None
            SPR03AC_RPT_FLD15 =
            Toby
            Basic Member
            Posts: 5
            Basic Member
              When you manuall add it from LID you are transferred to the @URS.2 form and need to click the green check mark and then click the Change button. I wonder how I replicate the clicking of the Green check mark?
              Gary Davies
              Veteran Member
              Posts: 248
              Veteran Member
                You can try using the jobrun. It will have to be a two step process because you can not update Dist Group from the RUN function of jobrun.exe.

                You would put an additional WebRun in front of the existing one with the func=run parameter with the following

                FUNC=update&JOB=SR03X0912A&USER=tcurry&DSTGRP=PF-TEST&SAVE=Y

                You can try using the FUNC=create if trying to combine the update and run into one, just don't know if it will update the dist group on a create.
                Toby
                Basic Member
                Posts: 5
                Basic Member
                  Gary,

                  Thanks that worked perfectly. Below is the end ags that I used:

                  FUNC=update&JOB=&USER=&FILE=&DSTGRP=&SAVE=Y

                  I did need to include the FILE= parm.
                  JoeS
                  Basic Member
                  Posts: 20
                  Basic Member
                    Toby,

                    In your include FILE=parm, what value are you substituting for parm?

                    Joe