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
------------------------------
Original Message:
Sent: 02-15-2021 18:50
From: Kevin King
Subject: Capturing _HOLD_ File entry for Unidata
I don't want to display it, I want to capture it in the program.
------------------------------
Kevin King
President
Precision Solutions, Inc.
Original Message:
Sent: 02-11-2021 05:18
From: Jonathan Smith
Subject: Capturing _HOLD_ File entry for Unidata
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
Original Message:
Sent: 02-10-2021 22:26
From: Kevin King
Subject: Capturing _HOLD_ File entry for Unidata
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.
------------------------------