Main Board > Language

*X Mnemonic / Print Channel Timing Question

(1/1)

Jeffrey Ferreira:
Hi All,

i'm trying to use *X mnemonic to print  to a text file and email to customer.
But i noticed that when I enter the call entry point the file is still open and locked for that matter.
I added another close inside of the call routine and that worked (i could access file).
But is this correct / good practice?

Jeff

Allen Miglore:
This aligns with the documentation. I found that the behavior changed way back at pvx 6.

'*X' (asterisk X) contains the pathname of a program to CALL on the closing of a channel. When a file is closed, PxPlus issues a CALL to the program/entry point specified by the contents of '*X'. This takes place just prior the file being actually being closed, allowing the program to alter the contents of the file if desired.

Jeffrey Ferreira:
Hi Allen,
thank you.
so closing the file (again) is not forbidden or bad.
jeff

Mike King:
Jeff

No, you can safely close the file in your *X logic.  The system checks for this and handles it appropriately. 

Jeffrey Ferreira:
Thank you Allen and Mike. I appreciate it.

Navigation

[0] Message Index

Go to full version