ATTR_STARTEDBY with Java ToolBox - IBM AS400

This is a discussion on ATTR_STARTEDBY with Java ToolBox - IBM AS400 ; I need to send one spooled file to AS System with Java AS400 sys = new AS400("AS400.SYSTEMXXX","USRX","PWDX"); ...... PrintParameterList parms = new PrintParameterList(); parms.setParameter(PrintObject.ATTR_OUTPUT_QUEUE, "/QSYS.LIB/ QUSRSYS.LIB/PRT01.OUTQ"); parms.setParameter(PrintObject.ATTR_HOLD, "*YES"); ...... I try also to change the name of the user that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ATTR_STARTEDBY with Java ToolBox

  1. ATTR_STARTEDBY with Java ToolBox

    I need to send one spooled file to AS System with Java

    AS400 sys = new AS400("AS400.SYSTEMXXX","USRX","PWDX");
    ......
    PrintParameterList parms = new PrintParameterList();

    parms.setParameter(PrintObject.ATTR_OUTPUT_QUEUE, "/QSYS.LIB/
    QUSRSYS.LIB/PRT01.OUTQ");
    parms.setParameter(PrintObject.ATTR_HOLD, "*YES");
    ......

    I try also to change the name of the user that send the report

    parms.setParameter(PrintObject.ATTR_STARTEDBY, "USR_B");

    but the statement above doesn't produce expected result

    The output report is always created by the user used to open the
    connection:
    AS400 sys = new AS400("AS400.SYSTEMXXX","USRX","PWDX");

    Anyone knows what I trying to do is possible or not?

    Thanks,
    Alessandro


  2. Re: ATTR_STARTEDBY with Java ToolBox

    il 06/11/2007 17.07, Scrive ale.kayakcomo@gmail.com 40462304:
    > I need to send one spooled file to AS System with Java
    >
    > AS400 sys = new AS400("AS400.SYSTEMXXX","USRX","PWDX");
    > .....
    > PrintParameterList parms = new PrintParameterList();
    >
    > parms.setParameter(PrintObject.ATTR_OUTPUT_QUEUE, "/QSYS.LIB/
    > QUSRSYS.LIB/PRT01.OUTQ");
    > parms.setParameter(PrintObject.ATTR_HOLD, "*YES");
    > .....
    >
    > I try also to change the name of the user that send the report
    >
    > parms.setParameter(PrintObject.ATTR_STARTEDBY, "USR_B");

    IMHO PrintObject.ATTR_STARTEDBY is a read-only attribute, because it
    refers to an event happened in the past that you cannot change just now
    nor in the future, used to retrieve the user-name who started a printer
    writer (see WriterJob class), that has nothing to do with spooled files
    (see SpooledFile class), even if they both extends PrintObject abstract
    class.
    Depending on the usage of your PrintParameterList, not shown in your
    original post so I'm only trying to guess, there may be attributes that
    you can set and other that you can only get.
    For example, for SpooledFile valid attributes see
    javadoc/com/ibm/as400/access/doc-files/SpooledFileAttrs.html
    note also that SpooledFile attributes are only a little subset of
    attributes provided by PrintObject.

    --
    Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñe joAlcoolInside
    Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
    Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
    schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'

+ Reply to Thread