Skip to Content
author's profile photo Former Member
Former Member

Carriage Return on SAP Security Audit Log


Would like to ask if anyone can help me write a Unix script that will break the Security Audit log into one security entry per line or insert a carriage return per entry which will be written to a new log file? We need to setup log file monitoring via RZ20 in Security Audit log file to monitor and capture specific pattern but we are having problem capturing accurate and correct entries in the log due to the nature of Security Audit log file that has no carriage return or line separator.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 01:49 PM

    Hello Rupert

    these few lines of perl code should help you to split a Security Audit Log

    open(FILE, "<FILE-NAME>") || die("Error reading file, stopped");
    while(read(FILE, $buffer, 200) ) {
    	print "$buffer\n";

    BTW you can also expand the print statement with an if clause and regexp to filter by Message-ID. The example shows a filter for logged RFC calls (MNo=AUK).

    print "$buffer\n" if ($buffer=~/2AUK/);

    regards/marc 😊

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.