For Programmers: Free Programming Magazines  


Home > Archive > Cobol > October 2006 > Mysterious 'z' qualifier preceding string...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Mysterious 'z' qualifier preceding string...
hobotech@gmail.com

2006-10-09, 3:55 am

Hi Folks

I recently saw a snippet of code like this:

MOVE z'FRED' TO NAME

(This is IBM Enterprose Cobol fo z/OS)

I've never seen the z before, and I can't find it documented.
Can anybody tell me :
a) What it means, and
b) Where it's documented?

Cheers
Ron

Richard

2006-10-09, 3:55 am


hobotech@gmail.com wrote:

> MOVE z'FRED' TO NAME
>
> (This is IBM Enterprose Cobol fo z/OS)
>
> I've never seen the z before, and I can't find it documented.
> Can anybody tell me :
> a) What it means, and
> b) Where it's documented?


It creates a 'zero terminated' string. That is the literal is 5
characters, the first 4 are 'FRED' and the fifth is a nul character
hex'00'.

It is an extension in some compilers and should be documented in the
language manual for your vendor if they support it.

hobotivo@gmail.com

2006-10-09, 3:55 am

Thanks Richard, that helps!
(And that should have been Enterprise COBOL, not Enterprose... Damn
stupid fingers!)

Cheers
Ron

Richard wrote:
> hobotech@gmail.com wrote:
>
>
> It creates a 'zero terminated' string. That is the literal is 5
> characters, the first 4 are 'FRED' and the fifth is a nul character
> hex'00'.
>
> It is an extension in some compilers and should be documented in the
> language manual for your vendor if they support it.


William M. Klein

2006-10-09, 7:56 am

For the documentation of the (already explained) extension see:

http://publibz.boulder.ibm.com/cgi-...3LR31/1.3.9.1.4

(I know that Micro Focus also supports this extension; I don't know if others do
as well)

--
Bill Klein
wmklein <at> ix.netcom.com
<hobotech@gmail.com> wrote in message
news:1160376198.886763.144570@m73g2000cwd.googlegroups.com...
> Hi Folks
>
> I recently saw a snippet of code like this:
>
> MOVE z'FRED' TO NAME
>
> (This is IBM Enterprose Cobol fo z/OS)
>
> I've never seen the z before, and I can't find it documented.
> Can anybody tell me :
> a) What it means, and
> b) Where it's documented?
>
> Cheers
> Ron
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com