09-29-2008 2:46 PM
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
Thanks.
09-29-2008 2:50 PM
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,
line(400),
end of tabl.
data: lines type i.
*----------------------------------------------------------------------
start-of-selection.
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.
09-29-2008 2:49 PM
Use the FM
ADS2KIPUPL_GET_FILE_ATTRIBUTES Get Application Server File Attributes
09-29-2008 2:50 PM
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,
line(400),
end of tabl.
data: lines type i.
*----------------------------------------------------------------------
start-of-selection.
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.
09-29-2008 2:51 PM
09-29-2008 3:03 PM
Hi krishna,
This function module is not available in system.
Could you please tell me any other FM ?
Thanks.
09-29-2008 3:13 PM