Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reading attribues of unix file in program

Hi All,

I want to use the attributes of unix file in program. Please tell me how i can do that ?

Attributes like :

1) date and time when file came in unix ( or created )

2) word count ( number of records ) of file


Former Member

Check the unix command which gives the date and time of a file. Check the ls command man page , it gives some help.for the unix command wc gives the word, lines, character count.

wc -l lines, wc -c, characters.

REPORT ZUNIX line-size 400
                no standard page heading.
data: unixcom like   rlgrap-filename.   
 "dir ex: wc -l
unixcom = 'wc -l'.
data: begin of tabl occurs 500,
      end of tabl.
data: lines type i.
  refresh tabl.
  call 'SYSTEM' id 'COMMAND' field unixcom
                id 'TAB'     field tabl[].
 "tabl will have the output of the commnad
"loop it and get the result.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question