iSeries Print Directories

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Walter
Advanced Member
Posts: 22
Advanced Member
    We run Lawson on a iSeries and as you may know, Lawson dynamically creates directories on the IFS to store the output.  For example, when I ran an instance of PR160, the following was created

    /LAW9/law/print/DSWK/pr160marwk/1/125820

    I need to program a way to determine this directory in a custom program that is to be run after a user runs PR160.  The problem is the /125852 directory, that appears to be somewhat random.  What I did find out is that in PR160, the variable F1@@PRINTFILE contains this path.  I want to be able to get at this value in my custom program without modifying PR160.  I initially thought of modifying PR160 by inserting a call to my custom program at the very end, passing the variable to it.  But we don't want to take ownership of PR160 by modifying the delivered code.  Does anyone have any ideas.  I do have a solution to address this but I don't particularly like it because it involves running a "C" program to scan thru the user's print directory; and it's ugly to say the least.
    Kwane McNeal
    Veteran Member
    Posts: 479
    Veteran Member
      I'm a tad rusty on my Lawson on iSeries, but this data should be in DBDBURP (aka in UNIX: GEN/USERRPT). there should be a field PrtFilePath.

      Walter
      Advanced Member
      Posts: 22
      Advanced Member
        I found the file.  It's located in the GENDB library on iSeries and the name is the same as in UNIX  .. USERRPT.  It appears it has exactly what I need except for a parameter from the PR160 form.  But I should be able to get that from file "JOBSTEP".

        Thanks Kwane ..