UNIX system call in COBOL


 
Thread Tools Search this Thread
Top Forums Programming UNIX system call in COBOL
# 1  
Old 11-10-2010
UNIX system call in COBOL

Hi,

The UNIX system call inside the COBOL program is doing
the specified command correctly.

MOVE W080-UNZIP-FILE-COMMAND TO W080-OUTPUT-COMMAND
CALL "SYSTEM" USING W080-OUTPUT-COMMAND
RETURNING W080-SYS-CALL-STATUS

BUT The problem is, the following keeps on showing on the log file
just after running the line CALL "SYSTEM".....
Although the status is = 256 which is an ACCEPTABLE-ERROR

gunzip: gunzip.gz: No such file or directory
gunzip: sleep.gz: No such file or directory
gunzip: 2.gz: No such file or directory
gunzip: FILEHDR.gz: No such file or directory
gunzip: A000000001000000001CHEQUE.gz: No such file or directory
gunzip: ADVICES.gz: No such file or directory
gunzip: compressed data not read from a terminal. Use -f to force decompression.


Could please someone advise, why those messages are showing on the logfile?

Thank you.
# 2  
Old 11-10-2010
please post the logic for W080-UNZIP-FILE-COMMAND
# 3  
Old 11-11-2010
Hi Frank

The W080-UNZIP-FILE-COMMAND is defined as

01 W080-UNZIP-FILE-COMMAND.
03 W080-UNZIP PIC X(07)
VALUE "gunzip ".
03 W080-FILE-NAME PIC X(100).


Following is the complete logic for W080-UNZIP-FILE-COMMAND

SET W080-SYS-SUCCESS TO TRUE
MOVE SPACES TO W080-OUTPUT-COMMAND
MOVE "CHECK_FILE.DAT" TO W080-FILE-NAME
MOVE W080-UNZIP-FILE-COMMAND TO W080-OUTPUT-COMMAND
CALL "SYSTEM" USING W080-OUTPUT-COMMAND
RETURNING W080-SYS-CALL-STATUS

Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Migrating jobs from COBOL Mainframe system to UNIX system

In a nutshell requirement is to migrate the system from mainframe environment to UNIX environment (MF cobol would be used I guess). I have not much of idea in this field. I need to do some investigation on following points - - Ease of conversion - Known Data compatibility issue - Issue in... (9 Replies)
Discussion started by: Tjsureboy4me
9 Replies

2. Shell Programming and Scripting

Calling script from RM cobol and returning value to cobol

Is there a way you can return a value from a script that is called from a rm cobol program... 01 WS-COMD-LINE-PGM X(39) value sh ./getUserId.sh 12345" 01 WS-RETURN-SYS-CODE PIC 9(8). CALL "SYSTEM" USING WS-COMD-LINE-PGM GIVING WS-RETURN-SYS-CODE. ... (1 Reply)
Discussion started by: pavanmp
1 Replies

3. Programming

cobol crn programme run on express cobol as .gnt

can i run .crn programme in express cobol which support to .gnt programme .... Plz tell me solution (2 Replies)
Discussion started by: bibi
2 Replies

4. UNIX for Dummies Questions & Answers

UNIX System Call for creating process

Hell Sir, This is chanikya Is there any System call which behaves just like fork but i dont want to return back two times to the calling func. In the following ex iam creating a child process in the called func but the ex prints two times IN MAIN. ex :- calling() { fork(); } ... (2 Replies)
Discussion started by: chanikya
2 Replies

5. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 Replies

6. Shell Programming and Scripting

how to call to unix through cobol

hi everyone i want to run a script in unix through cobol program does anyone know how shell i do this ? please please help me here thanks (8 Replies)
Discussion started by: naamas03
8 Replies

7. UNIX for Dummies Questions & Answers

Cobol On Unix

Hi , Could anyone please tell me about the whole procedure for compiling, linking the cobol program on unix platform. As i am mainframe guy and very new to unix, any help will be very appriciated, Regards, -Vinit (2 Replies)
Discussion started by: vinit_cyberguy
2 Replies

8. Solaris

Cobol linking in Unix

I'm trying to call a C mod from COBOL but I'm currently having difficulty linking my COBOL program with a C module that I've just developed. I've tried using cbllink -v -l -k -BSF CMPCACVN.cbl test.lib but I've got an error that states cbllink: not found. I've also tried using buildclient -C -w -o... (0 Replies)
Discussion started by: soulfactory2002
0 Replies

9. IP Networking

any system call in unix to access ip routing table

hi is there any system call by which ip routing table can be accessed. (1 Reply)
Discussion started by: vinodkumar
1 Replies

10. Programming

sigwait system call in UNIX signal

Hi Everybody, I have gone through man of sigwait and new to UNIX signals. Could anyone explain me about the following lines mentioned in sigwait man help ? "The selection of a signal in set is independent of the signal mask of the calling thread or LWP. This means a thread or LWP can ... (1 Reply)
Discussion started by: md7ahuja
1 Replies
Login or Register to Ask a Question