Sponsored Content
Top Forums Shell Programming and Scripting Calling script from RM cobol and returning value to cobol Post 302311798 by jim mcnamara on Wednesday 29th of April 2009 02:58:50 PM
Old 04-29-2009
Code:
01 WS-RETURN-SYS-CODE PIC 9(8).

That is a number not a string. When a script exits, the shell can return a maximum of an 8 bit number, not a string - ie 0-255 (unsigned). See man 2 wait (what COBOL calls when it fork/execs your script process). Write the return value to a file, then read it in from your COBOL.
 

10 More Discussions You Might Find Interesting

1. 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

2. Gentoo

COBOL on linux?!

Hello guys, I'm searching for a good COBOL compiler which runs on linux. In fact I have found one but I'm really lost with its installation!! I don't know how to install it and how it works. In fact I'm not so good in linux and I always have problems with installation, but this time it's... (1 Reply)
Discussion started by: HSN
1 Replies

3. Solaris

COBOL issue

Hi, I am working on a Mainframe to UNIX replatforming project. we are facing problems with COBOL COMP-3 fields. We are using the Mainframe emulator software to download the data which has COMP-3 fields and using it as input to the same COBOL programs which were copied from Mainframe and did the... (1 Reply)
Discussion started by: Jayaprakash T
1 Replies

4. UNIX for Dummies Questions & Answers

COBOL file status 39

When I execute a COBOL load module, I get the following error: $ a.out IWZ200S Error detected during OPEN for file 'ABE-INPUT'. File status is: 39. Message routine called from offset 0x38 of routine iwzWriteERRmsg. iwzWriteERRmsg called from offset 0x3c4 of routine... (3 Replies)
Discussion started by: jbrubaker
3 Replies

5. UNIX and Linux Applications

Rm-cobol 85

Does anyone use the following Cobol compiler: RM/COBOL-85 Compiler - Version 5.15.00 for SCO Unix 386. I am looking for a file that might be part of the distribution named "osmain.o" Thanks. (0 Replies)
Discussion started by: jgt
0 Replies

6. Programming

cobol programme

I have some compile programme .crn now I want to run .crn programme on express cobol which allow only *.gnt programme any solution to run *.crn programme (0 Replies)
Discussion started by: bibi
0 Replies

7. 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

8. SCO

cobol installation

Dear All, while installing mfcobol in sco open unix 5 in piv m/cs, when run #sh ./install this error massage is comming load error file lmfnewdb error code 198 pc=0 call=-1 seg=0 198 load failor chmod warrning can not acess /opt/lib/mflmf/mflmfdb no such file or directory (error-2)... (0 Replies)
Discussion started by: sudhir69
0 Replies

9. Linux

Cobol on Linux

Hello, I have got a specific requirement of running a COBOL code on EL5. Not sure if GCC includes the compiler for COBOL. Currently what I can think of installing openCOBOL in EL5 server and hand it over to developers. From what I think need to do is, compile COBOL code using openCOBOL ... (5 Replies)
Discussion started by: niravkamdar
5 Replies

10. Programming

UNIX commad in COBOL

Hi guys, i used the call "sytem" using ... in a cobol program. At the moment i stoped at an empasse, how cam I retrive the execution's result of unix command? Explenation, I made an 'pwd' command, and I must to have the directory inside the program. How can have this result? (2 Replies)
Discussion started by: Prosy60
2 Replies
end(3)							     Library Functions Manual							    end(3)

NAME
end, _end, _ebss, etext, _etext, edata, _edata, eprol, _ftext, _fdata, _fbss, _procedure_table, _procedure_table_size, _proce- dure_string_table, __istart, __fstart, _DYNAMIC, _DYNAMIC_LINK, _BASE_ADDRESS, _GOT_OFFSET, _cobol_main - locations in program and defini- tions in runtime procedure table SYNOPSIS
extern unsigned long end; extern unsigned long _end; extern unsigned long _ebss; /* First address above a program's */ /* uninitialized data region */ extern unsigned long etext; extern unsigned long _etext; /* First address above the text region */ extern unsigned long edata; extern unsigned long _edata; /* First address above the initialized */ /*data region */ extern unsigned long eprol; /* First instruction of the user's program */ /* that follows the runtime startup routine */ extern unsigned long _ftext; /* Start address of the text region */ extern unsigned long _fdata; /* First address of the initialized data */ /* region */ extern unsigned long _fbss; /* Start address of the uninitialized data */ /* region */ extern unsigned long _procedure_table; extern unsigned long _procedure_table_size; extern unsigned long _procedure_string_table; /* See under DESCRIPTION */ extern unsigned long __istart; /* Start address of the program's */ /* initialization function driver routine */ extern unsigned long __fstart; /* Start address of the program's */ /* termination function driver routine */ extern unsigned long _DYNAMIC; /* Address of a shared object's dynamic */ /* header table */ extern unsigned long _DYNAMIC_LINK; /* Identifies the link type of a program */ /* or shared library. 0 for non_shared, */ /* 1 for call_shared and 2 for shared */ extern unsigned long _BASE_ADDRESS; /* First mapped address of a program or */ /* shared library */ extern unsigned long _GOT_OFFSET; /* Address of the global offset table in */ /* a shared program or shared library */ extern unsigned long _cobol_main /* Address of the main routine in a cobol */ /* program */ DESCRIPTION
These names refer neither to routines nor to locations with interesting contents except for _procedure_table, _procedure_string_table, and, for Tru64 UNIX, __istart and __fstart. Except for eprol, these are all names of linker-defined symbols. Note that the end, etext, and edata symbols are not defined when you compile in ANSI mode. When execution begins, the program break coincides with _end, but it is reset by the routines brk(2), malloc(3), standard input/output, the profile (-p) option of cc(1), etc. The current value of the program break is reliably returned by "sbrk(0)"; (see brk(2)). The linker-defined symbols _procedure_table, _procedure_table_size, and _procedure_string_table refer to the data structures of the runtime procedure table. Because these are linker-defined symbols, the data structures are built by ld(1) only if they are referenced. See the include file sym.h for the definition of the runtime procedure table, and see the include file exception.h for its uses. These symbols are all absolute symbols; the value of each symbol is its address (for example, "&_procedure_table_size"). Any reference to the symbol itself will attempt to access the symbol's value as if it were a valid address and will most likely result in an access viola- tion. All of these symbols except for end, _end, eprol, __istart, and _cobol_main are defined as local symbols in an executable or shared library's dynamic symbol table. Consequently, an executable or shared library can only reference its own definitions of these local sym- bols. RELATED INFORMATION
brk(2), malloc(3). delim off end(3)
All times are GMT -4. The time now is 03:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy