I've written the following EXEC to execute any other EXEC and timestamp
each output line:
/*---------------------------------------------------------------------*
/
/* RunNLog - Run an EXEC and log output to it's log file
*/
/*
*/
/* Format: RUNNLOG execname params
*/
/* RUNNLOG keepdays execname params
*/
/*---------------------------------------------------------------------*
/
Trace "O"
Address COMMAND
Parse arg InArgs
If Datatype(Word(InArgs,1),"W") then
Do
Parse var Inargs KeepDays ExecFn args
FirstDate=Date("S",Date("B")-KeepDays,"B")
"PIPE (endchar ?)",
" FILEFAST" ExecFn "LOG A",
"| PICK W1 >>= /"FirstDate"/",
"| BUFFER",
"|i:FANIN",
"| >" ExecFn "LOG A",
"? CMS" ExecFn args,
"| SPEC TOD 1 1-* NW",
"| DATECONV 1.8 TODABS REXXS TIMEOUT",
"| SPEC 1.8 1 9.6 NW W2-* NW",
"| SPEC 1.8 1 9.6 NW W2-* NW",
"|i:"
End
else
Do
Parse arg ExecFn args
"PIPE CMS" ExecFn args,
"| SPEC TOD 1 1-* NW",
"| DATECONV 1.8 TODABS REXXS TIMEOUT",
"| SPEC 1.8 1 9.6 NW W2-* NW",
"| >" ExecFn "LOG A"
End
Exit rc
If I run a small test:
TESTRUNN EXEC A1 V 130
|...+....1....+....2..
0 * * * Top of File * *
1 /* */
2 Trace "O"
3 Say "First line"
4 "CP SLEEP 6 SEC"
5 Say "Second line"
6 Exit
7 * * * End of File * *
My output looks good, except for the fact that the timestamps are all
the same.
TESTRUNN LOG A1 V 80 Trunc=80
|...+....1....+....2....+....3.
0 * * * Top of File * * *
1 20130522 094935 First line
2 20130522 094935 Second line
3 * * * End of File * * *
Is there a way I can get accurate timestamps on each line?
TIA,
Frank M. Ramaekers Jr. | Systems Programmer | Information Technology |
American Income Life Insurance Company | 254-761-6649
_____________________________________________________
This message contains information which is privileged and confidential and is
solely for the use of the
intended recipient. If you are not the intended recipient, be aware that any
review, disclosure,
copying, distribution, or use of the contents of this message is strictly
prohibited. If you have
received this in error, please destroy it immediately and notify us at
[email protected].