I have had to move a string type field like a parameter to a field like this,

Jobn   char[40];

memset(Jobn,'0',sizeof(Jobn));
strcpy(Jobn,xxxxx);

Otherwise strcmp fails, where xxxxx is the parameter string

Scott ford
www.identityforge.com

On Sep 4, 2012, at 1:05 PM, retired mainframer <retired-mainfra...@q.com> wrote:

> The construct
>     char x[3] = "ABC";
> will legally initialize an array of char without adding the '\0'.  The only
> restriction is that this is not a string.
> 
> :>: -----Original Message-----
> :>: From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> :>: Behalf Of John Gilmore
> :>: Sent: Tuesday, September 04, 2012 9:02 AM
> :>: To: IBM-MAIN@LISTSERV.UA.EDU
> :>: Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12
> :>: announcment)
> :>:
> :>: If you construct an array by initializing it element by element you
> :>: get an array, one that is not nul-delimited or 'of conceptually
> :>: unlimited length', whatever that may mean.
> :>:
> :>: If you construct a string by initializing a character array with a
> :>: string, you get a nul-delimited string implemented under the
> :>: hood|bonnet as an array.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to