
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
REXX Log Wrap
Hi,
Am looking for a REXX script similiar to ZLOGWRAP. I am currently using the ZTASKSTA to record the number of active connections and logging them in to a seperate log. We want this to log to get wrapped up every 24 hrs similiar to SWITCH_TOD settings in edmprof.dat. I was thinking of using the same functionality in the ZTASKSTA rexx.
Thanks,
Vinod

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I suggest the following:
/* create one logfile per day */
clientip = edmgetv( 'SESSION', 'IPADDR')
call edmget 'ZCVT'
clogfile = ZCVT.LOGDIR || '\MYLOG-' || date(s) || '-' || ZCVT.MGRID || '.log'
Then compile an arbitrary line to write to log, e.g.:
logline = 'This line will be written to log'
And finally send to disk:
rc = lineout(clogfile,date(s) || " " || time() || ' <' || clientip || '> '|| logline)
rc = lineout(clogfile)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
Thanks a lot.
In the similiar way could we record this value every one hour in the same log every day? Like if the IP count is taken around 04:00 AM, the next count should take by 05:00 AM and next 06:00 AM and write it in the same log file?
Regards
Vinod