Calling a UNIX Shell Script from a Cobol program
Search Cobol unix jobs. Get the right Cobol unix job with company ratings & salaries. 339 open jobs for Cobol unix.
Calling a UNIX Shell Script from a Cobol program
Hello,
I think I'm on the right track with this, but it will not compile. Could you folks take a look and tell me what might be wrong?
PROCEDURE DEFINITION
CALL 'SYSTEM' USING WS-COMMAND.
WORKING STORAGE
01 WS-COMMAND-LINE.
03 WS-COMMAND-COM PIC X(25) VALUE '/test/glint/glint.sh '.
That being the absolute path to the script itself.
When trying to compile I get the errors:
( 7): Incomplete Quote, Error in TokRead
syntax error line 7: Unexpected symbol /
Warning: Missing period at end of file
Any ideas?
Thanks
I think I'm on the right track with this, but it will not compile. Could you folks take a look and tell me what might be wrong?
PROCEDURE DEFINITION
CALL 'SYSTEM' USING WS-COMMAND.
WORKING STORAGE
01 WS-COMMAND-LINE.
03 WS-COMMAND-COM PIC X(25) VALUE '/test/glint/glint.sh '.
That being the absolute path to the script itself.
When trying to compile I get the errors:
( 7): Incomplete Quote, Error in TokRead
syntax error line 7: Unexpected symbol /
Warning: Missing period at end of file
Any ideas?
Thanks
Active11 months ago
I am studying a college CIS degree. Next semester, I have a choice of either studying JAVA and COBOL or JAVA and PHP. I don't know much about COBOL and only have computers with Debian. The textbooks I have seen all focus on compiling COBOL in Windows.
Can Linux be used to develop COBOL apps and for learning how to program in COBOL or is this language only suited for running under Windows and with a Windows IDE? I want to build skills so that I can get a job, so need the full experience, don't want to be using some watered-down version of COBOL, some clone that copies it part-way, to to be limited to only a small amount of the libraries.
Village
VillageVillage89188 gold badges3535 silver badges5959 bronze badges
closed as primarily opinion-based by Kusalananda♦, Christopher, Jeff Schaller♦, Rui F Ribeiro, mosvyNov 2 '18 at 15:36
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
1 Answer
You can run Cobol on Linux perfectly, with GnuCOBOL,
GnuCOBOL translates COBOL into C and compiles the translated code using the native C compiler on various platforms, including Unix/Linux, Mac OS X, and Microsoft Windows.
Off-topic: I'm not sure you should go in depth with Cobol as it's a bit outdated. It's nice to know it, but if you want a good and steady job, try learning newer programming languages.
Rui F Ribeiro41.7k1616 gold badges9797 silver badges158158 bronze badges
AsenMAsenM