Rocket U2 | UniVerse & UniData

Expand all | Collapse all

Capturing _HOLD_ File entry for Unidata

  • 1.  Capturing _HOLD_ File entry for Unidata

    Posted 25 days ago
    When outputting to a _HOLD_ file, is there any Unidata function that will return the name of that file being created?

    ------------------------------
    Kevin King
    President
    Precision Solutions, Inc.
    ------------------------------


  • 2.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 24 days ago
    Kevin,

    If UDT.OPTIONS 84 is on, and the printer set to a _HOLD_ file, UniData displays the hold entry name each time a new hold file is created. With UDT.OPTIONS 84 OFF, UniData displays the _HOLD_ entry name only when SETPTR or SP.ASSIGN is executed.

    Thanks,
    Jonathan

    ------------------------------
    Jonathan Smith
    UniData ATS and Principal Engineer
    Rocket Software
    ------------------------------



  • 3.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 20 days ago
    I don't want to display it, I want to capture it in the program.

    ------------------------------
    Kevin King
    President
    Precision Solutions, Inc.
    ------------------------------



  • 4.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 19 days ago
    Kevin,

    This program demonstrates how to get it programmatically as there is no SYSTEM function etc to access it.


    OPEN "_PH_" TO F.PH ELSE STOP 'CANNOT OPEN _PH_'
    EXECUTE 'UDT.OPTIONS 84 ON' ; *** Ensure Job Number is displayed when new job started
    EXECUTE 'SETPTR 0,132,60,3,3,3,BRIEF' ; *** Set to Hold
    CAPTURE.NAME = "PCAPTURE" : @USERNO
    EXECUTE 'COMO ON ':CAPTURE.NAME:' HUSH' ; *** Set all screen to como file
    PRINTER ON
    PRINT "PJOB1"
    EXECUTE 'COMO OFF' ; *** Turn Como Off after first line of print job as HOLD name not displayed until then
    READV PRINT.JOB.INFO FROM F.PH,"O_":CAPTURE.NAME,2 ELSE PRINT.JOB.INFO = ""
    CRT "Hold Entry = " : FIELD(PRINT.JOB.INFO," ",3)
    DELETE F.PH,"O_":CAPTURE.NAME ; *** Tidy Up
    PRINTER OFF
    *** Reset Options
    EXECUTE 'SETPTR 0,132,60,3,3,1,BRIEF'
    EXECUTE 'UDT.OPTIONS 84 OFF'
    END


    :RUN BP KK.HOLD.TEST

    Hold Entry = _HOLD_\P_0000
    :

    ------------------------------
    Jonathan Smith
    UniData ATS and Principal Engineer
    Rocket Software
    ------------------------------



  • 5.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 19 days ago
    I have no idea why the email put a url in the middle of the code example at line 5, it should just read CAPTURE.NAME , if you look on the board itself that's how it appears.

    ------------------------------
    Jonathan Smith
    UniData ATS and Principal Engineer
    Rocket Software
    ------------------------------



  • 6.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 19 days ago
    Hey, that's clever.  I also found GETPU(..) in the manual.  This seems to work too:

    HFN = FIELD(GETPU(0),'/',2)

    GETPU(0) returns "_HOLD_/name" hence the FIELD(..).

    ------------------------------
    Kevin King
    President
    Precision Solutions, Inc.
    ------------------------------



  • 7.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 18 days ago
    Take a look at using the BANNER option when doing SETPTR to HOLD.  You can define what ever ID you want programmatically thus avoiding having to capture the info after the fact.

    HTH,

    Doug Miller
    Strategy 7

    ------------------------------
    Doug Miller
    Strategy 7
    ------------------------------



  • 8.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 19 days ago
    Kevin

    In universe this works
    EXECUTE "SETPTR" CAPTURING SCRAP
    HOLD.ID = TRIM(FIELD(SCRAP<8>,":",2))

    ------------------------------
    Jon Card
    Combined Transport Inc
    CENTRAL POINT OR United States
    ------------------------------



  • 9.  RE: Capturing _HOLD_ File entry for Unidata

    Posted 19 days ago
    For UniData if you want to use it with UDT.OPTIONS 84 OFF which may be easier then

    EXECUTE 'UDT.OPTIONS 84 OFF'
    DATA 'Y'
    EXECUTE 'SETPTR 0,132,60,3,3,3' CAPTURING OUTPUT
    CRT OUTPUT<11>
    END

    RUN BP KK.TEST.2
    Hold Entry _HOLD_\P_0000


    ------------------------------
    Jonathan Smith
    UniData ATS and Principal Engineer
    Rocket Software
    ------------------------------