20 years ago I had cron-jobs setup as
fglgo program-name < keystrokes.txt
where keystrokes.txt was as the name suggests was simply the keystrokes as required to be typed in to run the program manually. This was typically used to generate reports or kick off batch processes in the middle of the night.
A quick text with Four Js Genero suggests that the same principal still works. My little test program was
#! keystroketest.4gl
MAIN
DEFINE where_clause CHAR(100)
OPEN FORM f FROM "keystroketest"
DISPLAY FORM f
MENU ""
COMMAND "Query"
CONSTRUCT BY NAME where_clause ON field1, field2, field3
DISPLAY where_clause
EXIT MENU
END MENU
END MAIN
#! keystroketest.per
SCREEN
{
Field 1 [f01 ]
Field 2 [f02 ]
Field 3 [f03 ]
}
END
ATTRIBUTES
f01 = formonly.field1;
f02 = formonly.field2;
f03 = formonly.field3;
od -x keystroketest.txt
0000000 3151 3030 0d1b 000a
0000007
fglrun keystroketest < keystroketest.txt
field1='100'
So the keystroketest.txt sends Q (to select Query), 100 (to enter some data into the field), ASCII(27) ie Escape
The tricky bit is getting the ASCII(27) into the .txt file.
With FourJs Genero you can still do the above with your Informix-4gl program if you have not added any GUI widgets. If you have added GUI widgets you can also use our automated testing tool (Genero Ghost Client) to execute the 4gl program using a test script to automate it. So if you don't want to rewrite these programs but you want to compile and run them on a modern server etc that might be an option.