View previous topic :: View next topic |
Author |
Message |
whizkid79 Beginner

Joined: 29 Sep 2004 Posts: 53 Topics: 14
|
Posted: Tue Dec 07, 2004 1:48 am Post subject: Problem while passing a PL1 structure having varchar fields |
|
|
Hi,
DCl 1 STRUC based(STRUC_PTR),
5 ABC varchar(100),
5 DEF varchar(100);
I have a PL1 module A having the above structure. After filling the data, I'm passing STRUC_PTR to PL1 module B. Inside module B, i'm getting junk values in ABC and DEF. This is happening only if i pass varchar fields. If i declared ABC and DEF as char fields and passed STRUC_PTR to module B, i'm getting the correct values. But i need to pass varchar, not char. Can anyone let me know what the problem could be?
Thanks. |
|
Back to top |
|
 |
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Tue Dec 07, 2004 2:25 am Post subject: |
|
|
Hi,
how is the declaration of STRUC_PTR in modul A, is there any allocate for STRUC ?
This way works:
Module A
=======
DCL 1 STRUCT,
5 ABC char(100) varying;
CALL B(ADDR(STRUCT));
Module B
======
B: PROC (x) ;
DCL X PTR ;
DCL 1 STRUCT BASED(x),
5 ABC char(100) varying;
PUT SKIP EDIT(STRUCT.ABC)(A)
regards,
bauer |
|
Back to top |
|
 |
whizkid79 Beginner

Joined: 29 Sep 2004 Posts: 53 Topics: 14
|
Posted: Fri Dec 10, 2004 12:03 am Post subject: |
|
|
I'll give it a try. Thanks for your help. |
|
Back to top |
|
 |
|
|