gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Cobol


From: Sergey Kashyrin
Subject: Re: [open-cobol-list] Cobol
Date: Tue Mar 28 10:24:01 2006

Michael,
 
Don't see any problems to use "system" this way, or to write intermediate Cobol program (but note the"-fstatic-call" and 0-terminated string).
 
       IDENTIFICATION DIVISION.
       PROGRAM-ID. zrun7.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 WS-C-CALL.
           05 WS-CCALL PIC X(27) VALUE "cmd.exe".
           05 FILLER PIC X VALUE LOW-VALUE.
       PROCEDURE DIVISION.
           DISPLAY " Before.".
           CALL "system" USING WS-C-CALL.
           DISPLAY " After.".
           GOBACK.
G:\skatests\cobol>cobc -x -fstatic-call zrun7.cbl
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
 
cob8C14.c
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
 
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.
 
/out:zrun7.exe
zrun7.obj
g:\open-cobol\build_windows\x64\debug\libcob.lib
g:\open-cobol\build_windows\x64\debug\gmp.lib
 
G:\skatests\cobol>zrun7
 Before.
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
 
G:\skatests\cobol>exit
 After.
 
G:\skatests\cobol>
 
 
Regards,
Sergey
 
----- Original Message -----
Sent: Tuesday, March 28, 2006 4:56 AM
Subject: RE: [open-cobol-list] Cobol

Hi,

 

Sorry update to my last post. By the looks of our old runcobol was modified to add this module called “SYSTEM”, which ran a local system command.

In the source code below it suppose to run the script in the WS-C-CALL variable.

 

Is there any way I can replicate this SYSTEM module in open-cobol? And if so how, The code used in runcobol was C, and I really need to duplicate this SYSTEM call.

 

Thanks,

Michael da Silva Pereira

 


From: address@hidden [mailto:address@hidden On Behalf Of Michael da Silva Pereira
Sent: Tuesday, March 28, 2006 11:24 AM
To: address@hidden
Subject: [open-cobol-list] Cobol

 

Hi,

 

I have been trying to move an accouting packaged off a unix based solution, this packacge uses cobol to run.

 

I have started playing with open-cobol to try and get cobol to run on a linux system.

All is well except there are a few problems I am getting for example 1 Applciation gives me the following error:

 

[root@ v327f]# ./pdtest

libcob: cannot find module 'SYSTEM'

 

the source code is as follows:

 

       IDENTIFICATION DIVISION.

       PROGRAM-ID.      PDCALL.

       ENVIRONMENT DIVISION.

       CONFIGURATION SECTION.

       SOURCE-COMPUTER.      IBM.

       OBJECT-COMPUTER.      IBM.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

       01 WS-C-CALL.

         05 WS-CCALL                PIC X(27)

                        VALUE  "/d1/dat/s2000/test W".

       PROCEDURE DIVISION.

 

       0-MAIN SECTION.

       05-INIT.

           CALL "SYSTEM" USING WS-C-CALL.

 

       04-EXIT.

           EXIT PROGRAM.

 

 

Any ideas what the line “CALL "SYSTEM" USING WS-C-CALL” means? And How I can get around / fix this.

 

 

Thanks,

Michael da Silva Pereira


reply via email to

[Prev in Thread] Current Thread [Next in Thread]