× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: CL parameters over 32 length
  • From: Erwin Donker <erwin.donker@xxxxxxxxxx>
  • Date: Thu, 5 Jul 2018 13:54:57 +0000
  • Ironport-phdr: 9a23:wbMu4hGsQ+LQ9v+T4byQU51GYnF86YWxBRYc798ds5kLTJ76p8m8bnLW6fgltlLVR4KTs6sC17KI9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa8bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjul8qlrVQToiD8ZODEl7GHZhMtwjKdBrxKgoRx03orYbY6ROfZ7eK7WYNEUSndbXstJVyJPHJ6yb5cBAeQCM+ZXrYj9qEcBoxSxHgSsGPrvxiNUinPqwaE2zeIsGhzG0gw6GNIOtWzZotrvNKYcUOC1yrTDwzvEb/NQ2jfy9pLIeQ0mrP6SR7Jxf8vRyU81GwzYiVWQr4/lMC2P1ukWrmeU8exgVeK1hGE9pAF9uD6vxsM1h4TPm4kbxFfE9SBjz4Y0I921UEt7Yd+5H5tKrS6aMYR2Td04T250vyY6z6UKtoS+fCcQyZUnwBjfZ+abfIiP5xLvTPueLil+hHJlYr2wnRmy/VKmyu34TsW7ylNKrytDktXWqnAN0Bre4dWERPtl5kqtxCqD2xrO5u1ZO0w5lbbXJ4Q/zrIulJcfqVnPEjPslEj2gqKabEcp9vSy5+j6YLjrpoeQN4FqhQz9Lqgjn8myDOs2PwUNWmWU5fqw2bzt8ED8W7pGkuA6nrfcvZ/BO8sXuqq0DglI2Yg58Rm/FS2p0NEAkHkCK1JKZQyIgpDyO1HLPPD4FfC/g0mwkDtzx/DJILnhApLVI3bekLjsc6tx51BGxAQ20d1T/ZBaB60dLfzyQkH/u8LWAgUhPQK73ejrENR91oUAVmKTGqKVLb/evUWV6u4yOeWBZJMZtCzjJ/Q75fPilXo5lkUcfamt05sXcne4HvF+LkqHe3rtjNYBEWEQsgUjS+zqjl6CXiBJZ3upQq0z+Dc7CIK8AojZSYChmrqB3COjEp1Mem9GEkyMEWvvd4icXvcMaT+dItV7nTwCWriuVZYt1RW1uQ//yrpoM/DU9TcetZLsytd5/fHclRY39W88MsKGzmvYT31ohnhaAHgy3btjugp4y1uZ2K53jrpTEtkU4vpIVgIzM9nYzvdmCtb8XUXEf9uTQVCpT5CiUg02G50UwtMUakByFp2Znwvf0i+xS4MYnLyNBZc99urw3mP6Ot1mynHAm+F1ilgqWMJJOmDjgoZ69gTJDojGngOSkKP8JooG2yuY2X2czGzGkEZeUwNqGfHIR28eYA3aqtL661nqQ7KoCb0uPU1HzZjReeNxdtT1gAAeF7/YM9PEbjftymo=
  • List-archive: <https://archive.midrange.com/midrange-l/>
  • List-help: <mailto:midrange-l-request@midrange.com?subject=help>
  • List-id: Midrange Systems Technical Discussion <midrange-l.midrange.com>
  • List-post: <mailto:midrange-l@midrange.com>
  • List-subscribe: <https://lists.midrange.com/mailman/listinfo/midrange-l>, <mailto:midrange-l-request@midrange.com?subject=subscribe>
  • List-unsubscribe: <https://lists.midrange.com/mailman/options/midrange-l>, <mailto:midrange-l-request@midrange.com?subject=unsubscribe>

Hi,

Thanks everyone for your replies. The initial problem that was reported to me involved a CL that was called by a COBOL program. When I investigated, I debugged the CL by calling it from the command line with the same parameters.I now understand (thanks to your replies) that calling it from the command line will cause this issue, while calling it from within another program should not.

Out of curiosity I will do another debug tomorrow from the COBOL program and see what happens then. But to quickly fix our problem I will create a *CMD object as Rob suggested.

Thanks!

Erwin Donker


-----Oorspronkelijk bericht-----
Van: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] Namens Vernon Hamberg
Verzonden: donderdag 5 juli 2018 14:37
Aan: Midrange Systems Technical Discussion
Onderwerp: Re: CL parameters over 32 length

Hi Erwin

You ask why it used to work and now it doesn't, all of a sudden. And
that nothing has changed.

I suggest that you have been lucky. Probably what has been in memory has
been blanks. That is never guaranteed but can happen. An upgrade of the
OS could change alignment of parameters, maybe resulting in this change
for you. Or whatever happens in memory now.

You did not say how you have been calling the program - are you using
QCMDEXC or SMBJOB? Both of those behave as others have described doing
the call from a command line.

I do want to gently challenge your calling this a "problem"- it is long
documented - I'd say since 1980 or so, when System 38 came out (1978?).
This is a strongly-typed system as parameter definitions go - and that
typing includes size. We don't have the kind of parameter passing that
appends a null automatically, so one has to ask, what length would be
good as a default when the size is not known? This is similar to the
default for numeric values (packed 15,5) - that's definitely not what I
want when my parameter is packed 5,3 - but what other default
declaration would work better? No matter the choice, something will not
match.

Been there, done that, no T-shirt for this one, man!

Cheers
Vern

On 7/5/2018 2:58 AM, Erwin Donker wrote:
Hi,

We have a CL program that uses 3 input parameters. The first parameter is *CHAR length 50, the second parameter is *CHAR length 44 and the third parameter is *CHAR length 512.

When this CL program is called with values that are smaller than the parameter length (for instance 23 characters for the first parameter), we have noticed that the value of the second parameter gets added tot he first, starting at position 33.

I have searched the internet and have found that this behaviour is intentional. From what I understand, *CHAR parameters are padded with blanks up to 32 characters. Whatever was in memory after position 32 becomes part of the value of the first parameter.

I have also found several suggestions as workaround fort his issue, som y question is nota bout how I can solve this problem. What I really don't understand is why this CL program has worked for months without any problems and then suddenly starts showing this behaviour. The program has not been changed, the calling program has not been changed. We did apply PTF's but this was 1 week before the CL program started showing this behaviour so I don't think the PTF's are causing this. So basically what I want to know is, why does using CL parameters over 32 characters sometimes work, and sometimes not?

Another question out of curiosity, this "problem" has been around at least since 1998 and probably much longer (1998 was the oldest information I found online). I see many people having issues with this, so why has IBM never changed this?

Erwin Donker


De disclaimer van toepassing op e-mail van de gemeente Den Haag vindt u op: http://www.denhaag.nl/disclaimer

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
De disclaimer van toepassing op e-mail van de gemeente Den Haag vindt u op: http://www.denhaag.nl/disclaimer

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.