[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]
Automating data input for DOS console programs
Example: You have ABC.EXE program that requires user to enter user name then enter password then enter start date to begin the processing.
Here is "how to":
If the input is static and always the same you can create the input file just once and schedule a program type job to run "ABC.EXE < INPUT.TXT" command. If the input is dynamic, you can create a script type job which will create the INPUT.TXT dynamically and then execute "ABC.EXE < INPUT.TXT". Here is an example JAL script:
Dim data, string
Dim previous_busness_day, string, @ML"mm/dd/yyyy"
Dim process_id, number
ConcatEx "myname", "\r\n",
"mypassword", "\r\n", previous_busness_day, "\r\n", data
FileSave "c:\\temp\\input.txt", data
Run "c:\\programs\abc.exe < c:\\temp\\input.txt", "", process_id