Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Shmuel Metz (Seymour J.)
In <3240638450612647.wa.paulgboulderaim@listserv.ua.edu>, on 09/05/2012 at 06:09 PM, Paul Gilmartin said: >Is this IRXEXCOM, IIRC? >From the GI: 3.1.3.2 TSO/E REXX programming services  IRXEXCOM - Variable Access The IRXEXCOM variable access routine lets unauthorized

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Scott Ford
this IRXEXCOM > > Sounds right. > > Charles > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Paul Gilmartin > Sent: Wednesday, September 05, 2012 4:10 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: R

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Paul Gilmartin
On Wed, 5 Sep 2012 16:18:07 -0700, Charles Mills wrote: >> ADDRESS LINKPGM ... allow the called program to modify the Rexx variables >> passed as arguments > >Could be -- but you still get the *string data*, right, not the address of >whatever internal control block represents a variable inside

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Charles Mills
ember 05, 2012 4:10 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment) On Wed, 5 Sep 2012 15:41:15 -0700, Charles Mills wrote: >> It would be easy enough to code one that returns as a numeric string the >> address of one of its a

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Paul Gilmartin
On Wed, 5 Sep 2012 15:41:15 -0700, Charles Mills wrote: >> It would be easy enough to code one that returns as a numeric string the >> address of one of its arguments. > >My recollection is that when calling assembler from Rexx you get the address >of a copy of the string data, not the address o

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Charles Mills
s not more widely accepted, outside of the mainframe world. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Wednesday, September 05, 2012 3:16 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Strings (hijacked fro

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Paul Gilmartin
On Wed, 5 Sep 2012 18:02:51 -0400, Tony Harminc wrote: >On 5 September 2012 15:51, Charles Mills wrote: >> Rexx is so "magical" there is no real reason it could not support >> Substr(a,3,1) = 'x' and actually be doing a = Substr(a,1,2) || 'x' || >> Substr(a,4) under the covers. Even, for that mat

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Tony Harminc
On 5 September 2012 15:51, Charles Mills wrote: > Rexx is so "magical" there is no real reason it could not support > Substr(a,3,1) = 'x' and actually be doing a = Substr(a,1,2) || 'x' || > Substr(a,4) under the covers. Even, for that matter, Substr(a,3,1) = 'xyz' > or Substr(a,3,3) = 'x' Right -

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Scott Ford
gt; Behalf Of Tony Harminc > Sent: Wednesday, September 05, 2012 11:20 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment) > > On 5 September 2012 13:26, Scott Ford wrote: > >> I find it interesting that in REXX , i

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Charles Mills
es -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tony Harminc Sent: Wednesday, September 05, 2012 11:20 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment) On 5 September 2012 13:26, S

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Tony Harminc
On 5 September 2012 13:26, Scott Ford wrote: > I find it interesting that in REXX , its really easy to handle strings ..in > fact to me pretty simple. > Maybe because I very very familar with Rexx since it came out. Why cant C and > C++ be this way without going thru all the gyrations. In REXX

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Scott Ford
at I'm not aware of. Kind regards Bernd Am 05.09.2012 17:10, schrieb Anne & Lynn Wheeler: > paulgboul...@aim.com (Paul Gilmartin) writes: >> You, Lynn, and John G. are correct to distrust null-terminated strings. > re: > http://www.garlic.com/~lynn/2012l.html#67 Strings (hij

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Charles Mills
N@LISTSERV.UA.EDU] On Behalf Of Bernd Oppolzer Sent: Wednesday, September 05, 2012 8:47 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment) Good point. Many of you out there seem to dislike C for such reasons like that discussed here: you have to

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread McKown, John
nd Health Insurance Company.SM > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Bernd Oppolzer > Sent: Wednesday, September 05, 2012 10:47 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Strings (hijacked from: The IBM

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Bernd Oppolzer
17:10, schrieb Anne & Lynn Wheeler: paulgboul...@aim.com (Paul Gilmartin) writes: You, Lynn, and John G. are correct to distrust null-terminated strings. re: http://www.garlic.com/~lynn/2012l.html#67 Strings (hijacked from: The IBM zEnterprise EC12 announcment) in lots of discussions about

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Anne & Lynn Wheeler
paulgboul...@aim.com (Paul Gilmartin) writes: > You, Lynn, and John G. are correct to distrust null-terminated strings. re: http://www.garlic.com/~lynn/2012l.html#67 Strings (hijacked from: The IBM zEnterprise EC12 announcment) in lots of discussions about C language string&buffer conv

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-05 Thread Kirk Wolf
On Tue, Sep 4, 2012 at 7:03 PM, Paul Gilmartin wrote: > . > > You, Lynn, and John G. are correct to distrust null-terminated strings. > > But if you write in C, you are pretty much stuck with them since the library uses them. Call it distrust if you want, but they work fine with careful coding

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Shmuel Metz (Seymour J.)
In , on 09/04/2012 at 12:10 PM, Kirk Wolf said: >But other metal-level language implementations are not care free - >consider length-prefixed strings - the programmer must still check >lengths before moving data. Not if STRINGRANGE is enabled. -- Shmuel (Seymour J.) Metz, SysProg and J

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Paul Gilmartin
On Tue, 4 Sep 2012 14:32:12 -0500, Kirk Wolf wrote: > >(BTW - strncpy() also zeros bytes after the terminator, if necessary) > >For more information, see: http://www.courtesan.com/todd/papers/strlcpy.html >under "Common Misconceptions" > There's no discernible date of publication of that paper save

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Charles Mills
--- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Scott Ford Sent: Tuesday, September 04, 2012 12:04 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment) I have had to move a string type field like a paramet

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread retired mainframer
:>: From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On :>: Behalf Of Scott Ford :>: Sent: Tuesday, September 04, 2012 12:04 PM :>: To: IBM-MAIN@LISTSERV.UA.EDU :>: Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 :>: announcment) :>: :>: I have h

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Sam Siegel
e '\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:

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Kirk Wolf
On Tue, Sep 4, 2012 at 2:03 PM, Scott Ford wrote: > 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,x); > > Otherwise strcmp fails, where x is the parameter string > > > "fails" how? the

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Scott Ford
[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 c

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Kirk Wolf
No argument - base C "strings" (null terminated char[]) are a PITA from C programmers POV, since you must ever vigilant. Good programming practices and standards are key. Besides the obvious use of strncpy(), strncat(), etc, BSD (considered by most as the most secure *nix OS) encourages strlcpy

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread retired mainframer
:>: 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,

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Anne & Lynn Wheeler
paulgboul...@aim.com (Paul Gilmartin) writes: > And here, I find myself in rare agreement with John G.'s view > (if I understand correctly). A char[] containing no \0 is a perfectly > valid array of char. It is not a string, by C's convention, and there > is no requirement that a char[] represent

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread John Gilmore
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

Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Charles Mills
f Paul Gilmartin Sent: Tuesday, September 04, 2012 8:48 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Strings (hijacked from: The IBM zEnterprise EC12 announcment) On Tue, 4 Sep 2012 07:57:17 -0700, Charles Mills wrote: >Just because you *can* create a malformed string with no delimiter does not >

Strings (hijacked from: The IBM zEnterprise EC12 announcment)

2012-09-04 Thread Paul Gilmartin
On Tue, 4 Sep 2012 07:57:17 -0700, Charles Mills wrote: >Just because you *can* create a malformed string with no delimiter does not >mean that my statement about proper C behavior is untrue. > And here, I find myself in rare agreement with John G.'s view (if I understand correctly). A char[] co