MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help: LENGTH option of CICS LINK.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
stingshi
Beginner


Joined: 15 Apr 2004
Posts: 7
Topics: 2

PostPosted: Mon Sep 20, 2004 9:16 pm    Post subject: Help: LENGTH option of CICS LINK. Reply with quote

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
View user's profile Send private message
stingshi
Beginner


Joined: 15 Apr 2004
Posts: 7
Topics: 2

PostPosted: Mon Sep 20, 2004 11:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Tue Sep 21, 2004 5:30 am    Post subject: Reply with quote

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
View user's profile Send private message
stingshi
Beginner


Joined: 15 Apr 2004
Posts: 7
Topics: 2

PostPosted: Thu Sep 23, 2004 12:45 am    Post subject: Reply with quote

Hi, Mike,

Its great! It is caused by the TRUNC option when compile in COBOL.

Thanks so much.
Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group