Hello,
This forum has been helpful in keeping my sanity with code syntax. Especially when folks say code works sometimes. This is my first post. Thanks to all for your inputs.
I am monitoring product testing and archiving the results to local C drive path and archiving to a mapped shared drive path. The archive works great when all paths exist. Testing success is flaky though.
PROBLEM: When the mapped path is physically removed, ASPECT just writes to any previous working path and indicates the write was SUCCESS.
["set capture path Archive"] where string "Archive" contains the full shared pathname, was placed before each File command such as SBSAVE ISFILE FWRITE and FOPEN etc.
QUESTION 1.) How can ASPECT be forced to FAIL a command if the capture path desired is not found?
QUESTION 2.) Also, FWRITE and FPUTC are not working to write a "stamp of verification" string to the archived result file.
Below is a paste from the subject program (all indents are removed):
;;;;;;;;;;;;Code Paste, ProComm Ver 4.8 ;;;;;;;;;;;;;;
set capture path LogPath ;Set local LogPath just prior to saving.
sbsave FILE SerialNumStr APPEND ;GOLD line to save buffer to LogPath Path.
pause 1
set capture path LogPath
isfile SerialNumStr
pause 1 ;may need to be 4 secs for international delay
if success
termmsg "`r`n"
Fname = SerialNumStr ;File to check and stamp.
termmsg "RESULTS Captured at Log Path `"%s`r`n" LogPath
set capture path LogPath
if fopen 0 Fname READWRITE ;Open file for readwrite.
pause 1
fwrite 0 "**********************************************" 46
fwrite 0 "* PASSED POWER_UP SCREEN. Unit is shippable. *" 46 ;Write string to file.
fwrite 0 "**********************************************" 46 ;Write string to file.
fclose 0 ;Close the file.
termmsg "Local archive done.`r`n"
goto VPN_ARCHIVE
else
set Terminal Colors 2 ;set the terminal colors to index 2 red, fail
termmsg "TEST FAILED.`r`n" ;archive VERIFICATION FAILED so therefore TEST FAILED
termmsg "Local Archive Verification FAILED. "
termmsg "This workstation must have valid pathname.`r`n"
termmsg "Contact Test Engineering!`r`n"
goto VPN_ARCHIVE
endif
;;;;;;;;;;;;;;;;;;;;;;end paste;;;;;;;;;;;;;;;;;;;;;;
Thanks.
This forum has been helpful in keeping my sanity with code syntax. Especially when folks say code works sometimes. This is my first post. Thanks to all for your inputs.
I am monitoring product testing and archiving the results to local C drive path and archiving to a mapped shared drive path. The archive works great when all paths exist. Testing success is flaky though.
PROBLEM: When the mapped path is physically removed, ASPECT just writes to any previous working path and indicates the write was SUCCESS.
["set capture path Archive"] where string "Archive" contains the full shared pathname, was placed before each File command such as SBSAVE ISFILE FWRITE and FOPEN etc.
QUESTION 1.) How can ASPECT be forced to FAIL a command if the capture path desired is not found?
QUESTION 2.) Also, FWRITE and FPUTC are not working to write a "stamp of verification" string to the archived result file.
Below is a paste from the subject program (all indents are removed):
;;;;;;;;;;;;Code Paste, ProComm Ver 4.8 ;;;;;;;;;;;;;;
set capture path LogPath ;Set local LogPath just prior to saving.
sbsave FILE SerialNumStr APPEND ;GOLD line to save buffer to LogPath Path.
pause 1
set capture path LogPath
isfile SerialNumStr
pause 1 ;may need to be 4 secs for international delay
if success
termmsg "`r`n"
Fname = SerialNumStr ;File to check and stamp.
termmsg "RESULTS Captured at Log Path `"%s`r`n" LogPath
set capture path LogPath
if fopen 0 Fname READWRITE ;Open file for readwrite.
pause 1
fwrite 0 "**********************************************" 46
fwrite 0 "* PASSED POWER_UP SCREEN. Unit is shippable. *" 46 ;Write string to file.
fwrite 0 "**********************************************" 46 ;Write string to file.
fclose 0 ;Close the file.
termmsg "Local archive done.`r`n"
goto VPN_ARCHIVE
else
set Terminal Colors 2 ;set the terminal colors to index 2 red, fail
termmsg "TEST FAILED.`r`n" ;archive VERIFICATION FAILED so therefore TEST FAILED
termmsg "Local Archive Verification FAILED. "
termmsg "This workstation must have valid pathname.`r`n"
termmsg "Contact Test Engineering!`r`n"
goto VPN_ARCHIVE
endif
;;;;;;;;;;;;;;;;;;;;;;end paste;;;;;;;;;;;;;;;;;;;;;;
Thanks.