Claus_Jambrich_5663

Return value of PREP_PROCESS_FILENAME

Discussion created by Claus_Jambrich_5663 on Feb 8, 2018
Latest reply on Feb 9, 2018 by Michael_Lowry
Your question was:
The documentation lists the return codes of the script function PREP_PROCESS_FILENAME:

vd6cbrwyfboo.png

But how to retrieve them?

Our answer:
Use the script function SYS_LAST_ERR_NR. You can use it like this:

:SET &HND# = PREP_PROCESS_FILENAME("VWGSUP15_WS112_X64_01_SYS","c:\uc4\xyz\*","Y",,,,"UC_LOGIN=LOGIN.JAC")
:SET &ERRNR# = SYS_LAST_ERR_NR()
:IF &ERRNR# NE "0"
:   SET &ERRINS#  = SYS_LAST_ERR_INS()
:   SET &MESSAGE# = GET_MSG_TXT (&ERRNR#,&ERRINS#)
:   SEND_MSG , , &MESSAGE#
:ENDIF

You will get a message like above in the Message Window:

08.02.2018 09:20:55 -  U00020000 Message from 'JAC/SUP': 'U00011436 Error while sampling files. Filter: 'c:\uc4\xyz\*', error code: '3', error description: 'The system cannot find the path specified.'.'

Outcomes