i have a question with the PREP_PROCESS() Function:
! Set view
! Create a file with hallo inside
echo hallo > /home/automic/hallodatei.txt
! List to see if the file exists
ls -l /home/automic/hallodatei.txt
! Read the File
! Read the file now with the PREP_PROCESS
:SET &HND# = PREP_PROCESS("UNIX01","UNIXCMD",,"CMD=cat /home/automic/hallodatei.txt","UC_LOGIN=LOGIN.ALL")
: SET &LINE# = GET_PROCESS_LINE(&HND#)
So i create a file with "hallo" inside and then i just read the file.
That works fine.
now - i need to do this with PREP_PROCESS but there is no STDOUT in the &HND#.
When i play with "echo hello" instead of "cat .....txt" i see the "hello" in the PROCESS &HND#
The Main Idea behind this is that i want to delete files with the HOST command.
I have to know if the file has been deleted correct. IF the deletion was correct i want to clean a VARA Object.
Of course, i could call another JOBS which delete the file and check the STATUS from that job - BUT - there is PREP_PROCESS which could allow me to do that in ONE Script. Would be great and useful for future actions!
(PS: i am in the SCRIPT Course and here we all don´t know why the STDOUT sometimes is in the &HND# and why sometimes not)