[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Re : CALL SYSTEM OR CALL "SYSTEM"
From: |
Roger While |
Subject: |
[open-cobol-list] Re : CALL SYSTEM OR CALL "SYSTEM" |
Date: |
Thu, 08 Feb 2007 14:44:02 +0100 |
Alain,
That's just luck.
Consider -
01 xxx.
03 mycmd pic x(2) value "ls".
03 rubbish pic x(7) value "rubbish".
CALL "system" USING mycmd.
Normally, one passes 01 levels to CALL's
(and in fact if this is not so will get flagged
at compile time with default,cobol85,cobol2002 options)
(OC 0.33)
A 01 level is (implicitely) specifically generated at an assembler
computer boundary. There is no standard that says that
bytes following this (to the next data definition) have to
have the value NULL.
Therefore, always use CALL "SYSTEM" or
you REALLY know what you are doing :-)
(ie. you pass a null terminated string)
Roger
- [open-cobol-list] Re : CALL SYSTEM OR CALL "SYSTEM",
Roger While <=