View previous topic :: View next topic |
Author |
Message |
stingshi Beginner
Joined: 15 Apr 2004 Posts: 7 Topics: 2
|
Posted: Mon Sep 20, 2004 9:16 pm Post subject: Help: LENGTH option of CICS LINK. |
|
|
Hi,
I am using a CICS DPL LINK in COBOL like this:
-----
wk-len pic s9(4) comp.
wk-comm pic x(3200).
EXEC CICS LINK PROGRAM(wk-rmpgm)
COMMAREA(wk-comm)
LENGTH(wk-len)
SYSID(xxx)
END-EXEC.
-----
i wanna pass 32000 bytes to 'wk-rmpgm', is it possible?
or if it possible when i link a local program in my CICS TS (on zOS)?
how can i specify the data-value (like that 32000, 24000 etc.) to 'wk-len' while its type is ' s9(04) comp'?
i have read that:
----------------
When a CICS command offers the LENGTH option, it is generally expressed as a signed
halfword binary value. This puts a theoretical upper limit of 32 763 bytes on LENGTH. In
practice (depending on issues of recoverability, function shipping, and so on), the
achievable upper limit varies from command to command, but is somewhat less than this
theoretical maximum.
To be safe, do not let the value assigned to the length option for any CICS command
exceed 24KB.
-------------------
hope your help.
sting. |
|
Back to top |
|
 |
stingshi Beginner
Joined: 15 Apr 2004 Posts: 7 Topics: 2
|
Posted: Mon Sep 20, 2004 11:53 pm Post subject: |
|
|
sorry for above question:
i can pass 32000 more bytes to a local program by specify
'LENGTH(LENGTH OF wk-comm)'.
my problem is when i pass 32000 bytes data to a remote program, like syntax above,
the LENGTH field value changed to 2000.
my local system is CICS TS 2.2 on zOS, remote system is CICS for AIX, resource definition :
for 'connection':
ACcessmethod : Vtam
PRotocol : Appc
for 'sessions:
MOdename : M62APPC
SESSION PROPERTIES
Protocol : Appc
MAximum : 040 , 020
RECEIVEPfx :
RECEIVECount :
SENDPfx :
SENDCount :
SENDSize : 04096
RECEIVESize : 04096
anybody help, please. thanks.
sting. |
|
Back to top |
|
 |
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Tue Sep 21, 2004 5:30 am Post subject: |
|
|
This problem is usually caused by using the wrong compiler options in COBOL.
You must NOT use TRUNC(STD) since this can truncate (for example) an S9(4) comp field to 4 digits - e.g. 32000 truncates to 2000.
You can use either TRUNC(BIN) which is 100% safe or TRUNC(OPT) which is a lot more efficient but has some minor restrictions (which won't affect you in this case).
The reason this works for a local LINK is that a pointer to the data is being passed and the pointer points to the start of your 32000 bytes so you can access it regardless of the length. In the remote case, the data has to be copied to the other system so only the first 2000 bytes are copied due to the truncated length. |
|
Back to top |
|
 |
stingshi Beginner
Joined: 15 Apr 2004 Posts: 7 Topics: 2
|
Posted: Thu Sep 23, 2004 12:45 am Post subject: |
|
|
Hi, Mike,
Its great! It is caused by the TRUNC option when compile in COBOL.
Thanks so much.
 |
|
Back to top |
|
 |
|
|