the script after passing this line should write only upto the limit ISFLINE.0
More or less. Except...
DO IX=1 TO ISFLINE.0
"EXECIO * DISKW ISFOUT (STEM ISFLINE. FINIS"
END
Say, for example, that you have 20,000 records
What your code does:
1. do this loop 20,000 times
2. in each iteration, write 20,000 lines.
you are trying to write 20,000 x 20,000 = 40,000,000 lines. Which is way more than what you really want.
But actually, the FINIS probably causes the second and subsequent iterations to fail. What does your trace show? You need to issue EXECIO only once. And check the return code to make sure it works.
I'm afraid i'm not sure how to get the timestamp ? Please advice.
I expect each line of syslog to have a timestamp at the start of each record. What I was asking for was the first part of the first record and the first part of the last record.
ADDRESS SDSF "ISFLOG READ TYPE(SYSLOG)"
You are reading the active syslog. But as NicC mentioned, it is constantly being updated. It keeps growing, except that it is periodically offloaded to an archive. Say that your first READ is at 9:59, you may get 20,000 records. And then the system archives the syslog at 10:00. When your second READ occurs at 10:01, you will get vastly different results than the first READ.