Roger,
Every Standard that I know of has allowed one to pass EITHER an 01-level
*OR* an elementary item. What was disallowed was passing a group-item that
wasn't an 01-level, i.e. "intermediate" group item.
The '02 Standard removed this restriction (which almost no actual
implementations previously enforced). See the substantive change:
"10) CALL argument level numbers. CALL arguments may be elementary or groups
with any level number. Formerly, they had to be elementary or have a level
number of 1 or 77."
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Roger While
> Sent: Thursday, February 08, 2007 7:44 AM
> To: address@hidden
> Cc: address@hidden
> Subject: [open-cobol-list] Re : CALL SYSTEM OR CALL "SYSTEM"
>
> 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
>
>
>
> --------------------------------------------------------------
> -----------
> Using Tomcat but need to do more? Need to support web
> services, security?
> Get stuff done quickly with pre-integrated technology to make
> your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
> dat=121642
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>