Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

issuing unix command for zip from ABAP

Former Member
0 Kudos

Hello All,

Im trying to ZIP a file present in the application server using the following command.

the file is present in /user and file name is testfile.dat


DATA: g_f_unixcom LIKE rlgrap-filename.

DATA: BEGIN OF g_t_tabl OCCURS 500,
        line(400),
      END OF g_t_tabl.

REFRESH g_t_tabl.

g_f_unixcom = 'gzip /usr/testfile.dat /usr/testfile.zip'.

CALL 'SYSTEM' ID 'COMMAND' FIELD g_f_unixcom
              ID 'TAB'     FIELD g_t_tabl[].

But im unable to get the zip file in the application server.

Please suggest me whether Im giving correct command or not.

Im using Version 4.6B

Good answers will be appreciated.

Thanks in advance.

Best Regards,

Sasidhar Reddy Matli.

1 REPLY 1

Former Member
0 Kudos

Hi

Answer is pure assumption

If your OS is AIX the command is 'compress'

If your OS is Linux command is 'gzip', 'compress', 'b2zip'

Regards

Madhan D