|
Okay, this looks to me like the things C does. You are telling your procedure to expect 32k of data as a constant length string. In C this would be an array of char 32k long. Then you pass in an 128 string. Again, esentially an array of 128 chars. When the procedure gets this, I believe it is just getting a pointer to your parameter. It knows that this pointer is pointing to a characters string 32k long. And that's how it treats it. So, that extra junk you are seeing is whatever happens to be in memory past your actual string. This would be okay, if you were also passing the actual length of the data, so that you could only act on the data up to your actual string length. I think you are going to have to use varying or the such. Reguardless of what the manual says, that's what the sample you've given and the var dumps show me. I'm sure Hans might have more insight or correction. HTH, Jim Langston -----Original Message----- From: Peter Dow To: rpg400-l@midrange.com Sent: 12/13/2001 10:22 AM Subject: Re: Procedure parameter with VALUE option Hi Hans, Thanks for looking at this. Yes, I checked the values with the debugger, <SNIP> This was CnvRec in the RPGLE program just before doing the CALLP: EVAL cnvrec:x 00000 C7D340C3 D6D5E5C5 D9E2C9D6 D540D3D7 - GL CONVERSION LP 00010 C840C7D3 40839695 A58599A2 89969540 - H GL conversion 00020 8481A381 40869699 40F1F061 F3F161F0 - data for 10/31/0 00030 F14081A2 40968640 F1F261F1 F261F0F1 - 1 as of 12/12/01 00040 25404040 40404040 40404040 40404040 - . 00050 40404040 40404040 40404040 40404040 - 00060 40404040 40404040 40404040 40404040 - 00070 40404040 40404040 40404040 40404040 - Upon entry to IFS_prt before anything was executed: EVAL text:x 00000 C7D340C3 D6D5E5C5 D9E2C9D6 D540D3D7 - GL CONVERSION LP 00010 C840C7D3 40839695 A58599A2 89969540 - H GL conversion 00020 8481A381 40869699 40F1F061 F3F161F0 - data for 10/31/0 00030 F14081A2 40968640 F1F261F1 F261F0F1 - 1 as of 12/12/01 00040 25404040 40404040 40404040 40404040 - . 00050 40404040 40404040 40404040 40404040 - ...duplicate lines omitted 003F0 40404040 40404040 40404040 40404040 - 00400 00000000 00000490 00000000 00000000 - .......°........ 00410 00000000 00000490 40404040 40404040 - .......° 00420 00000000 00000490 40404040 40404040 - .......° <SNIP>
As an Amazon Associate we earn from qualifying purchases.
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.