report z. * 1. delay after unix command to complete standard & diagnostic output * (time to executing) = 4 seconds: constants: c_time type i value 4000000. "in microseconds types: t_cmd(255) type c, "Unix Command with Args etc t_it type t_cmd occurs 0. "Table of Information ************************************************************************ constants: *---- file names (output and diagnostic) c_log type t_cmd value '/tmp/sgicsbinipivvva', c_diag type t_cmd value '/tmp/soisisdinipivvva', *---- UNIX commands redirectors. u_gt type t_cmd value '>', u_2gt type t_cmd value '2>'. ************************************************************************ parameters p_cmd type t_cmd default 'date' obligatory lower case. ************************************************************************ data: w_cmd type t_cmd, "Unix command with redirection it_log type t_it with header line, "Output it_diag type t_it with header line. "Diagnostic ************************************************************************ end-of-selection. perform unix_command using p_cmd. ************************************************************************ form read_file tables p_it type t_it using value(p_file) type t_cmd. data w_msg(50). *--- open UNIX file open dataset p_file for input in text mode message w_msg. if sy-subrc ne 0. write: / 'Cannot open for reading:', p_file, w_msg. exit. endif. *--- read UNIX file clear: p_it, p_it[]. do. read dataset p_file into p_it. if sy-subrc = 0. append p_it. else. exit. endif. enddo. *--- close UNIX file close dataset p_file. endform. ************************************************************************ form unix_command using value(p_cmd) type t_cmd. data: w_time type i, w_start type i. write p_cmd. concatenate p_cmd u_gt c_log u_2gt c_diag into w_cmd separated by space. call 'SYSTEM' id 'COMMAND' field w_cmd. clear: it_diag, it_diag[], it_log , it_log[]. get run time field w_time. w_start = w_time. do. get run time field w_time. subtract w_start from w_time. if w_time > c_time. exit. endif. perform read_file tables it_diag using c_diag. perform read_file tables it_log using c_log. enddo. loop at it_diag. write / it_diag color col_negative intensified off. endloop. loop at it_log. write / it_log color col_positive intensified off. endloop. endform. ************************************************************************