Sometimes we are in a situation where in JDE not have a function, features or functionality to perform a certain task, or is too complex, and with a Windows command or Linux command (depends of Enterprise Server) it's easy. For example search text files in a directory, search for a PDF generated with BIP, etc.
Example:
//
// Linux command to search files
//
VA evt_Command_NFLF = concat('/bin/ls -1 ',concat(directory,concat(' | egrep -i $*.csv > ',tempFile_directory)))
//
// Windows command to search files
//
VA evt_Command_NFLF = concat('dir /A:-D /B ',concat(directory,concat(' > ',tempFile_directory)))
//
Execute External Program
VA rpt_ErrorCode_ERRC <- BF cErrorCode
VA evt_Command_NFLF -> BF szCommandLine
//
If VA rpt_ErrorCode_ERRC is equal to "1"
Stop Batch Processing
End If
//
No hay comentarios:
Publicar un comentario