View previous topic :: View next topic
|
Author |
Message |
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
Hi,
the twasize is defined as 500 for this transaction
What will heppen if i execute this code
char * ptwa = new char(1000);
exec cics address twa(ptwa)
As per my understanding this command should abend.
Please let me know if i am correct.
Regards
Rashmi |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
EXEC CICS ADDRESS TWA returns the address of the TWA into a pointer and has nothing to do with the length of the TWA. If an attempt is made to write beyond the specified length (500 in this case), then you would get a storage violation and the task would abend with ASRA.[/quote] |
|
Back to top |
|
|
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
yes that's what i am trying to say, if i want to write more than 500 in the ptwa variable then it will give storage violation and abend.
Is it true? please correct me if i am wrong. |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
To be honest, I do not understand what the following line is trying to achieve:
char * ptwa = new char(1000);
If you could explain that, it would be helpful.
Thanks. |
|
Back to top |
|
|
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
sorry but that statement is like
char * ptwa;
only declaring a character pointer.
Regards
Rashmi |
|
Back to top |
|
|
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
may be i would just like to re write the scenario in more understandable way
twasize is defined as 500 for this transaction
char * ptwa;
char str1[1000];
copy 1000 characters to str1 variable;
exec cics address twa(ptwa);
strcpy(ptwa,str1);
now what will happen in this case. |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
This would be storage violation.
The task can abend with ASRA or may just proceed as though nothing wrong has happened. Whether the task abends or not depends on the area allocated to TWA when the task begins executing. In either case, you would see a message in the message log saying that a storage violation has occurred. |
|
Back to top |
|
|
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
thanks |
|
Back to top |
|
|
Devindra Pratap Singh
New User
Joined: 14 Jul 2007 Posts: 6 Location: Mumbai
|
|
|
|
I am facing following error during online transaction
DFHAC2206 01:20:47 CICSD Transaction XX01 failed with abend TWAL. Updates to
local recoverable resources backed out. "
It's during excecuting TWALENG & abend code is TWAL.
Please help me to understand meaning of same & how to resolve this.
Thanks, |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
The TWASIZE is defined at the PCT (Transid) level in CEDA/RDO. Send a request to your CICS Tech Support and/or CICS Sys Prog to request an increase.
Regards,
Bill |
|
Back to top |
|
|
rajendra345 Warnings : 1 New User
Joined: 10 Mar 2008 Posts: 1 Location: hyderabad
|
|
|
|
rashmi.ranjan75 wrote: |
yes that's what i am trying to say, if i want to write more than 500 in the ptwa variable then it will give storage violation and abend.
Is it true? please correct me if i am wrong. |
|
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
Yes, yes, yes, its true. DO NOT try to write more data in the TWA than is defined by the TWASIZE for the transaction, otherwise it will definitely
cause problems.
From you code snipets, looks like your code is Java or some type
of EcmaScript language.
Most of us COBOL folks on this forum don't understand.
Why can't you just ask your CICS Systems programmer about this ? The twasize can be increased to 1000 to meet your needs. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
From you code snipets, looks like your code is Java or some type
of EcmaScript language. |
thats just painful C |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
like I said, must of us COBOL folks (and some assembler) don't
speak the language, which does make it painful to answer a forum questoin about. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi....
Quote: |
char * ptwa;
char str1[1000];
copy 1000 characters to str1 variable;
exec cics address twa(ptwa);
strcpy(ptwa,str1); |
Rashmi you are explaining the things in C-language or your work floor uses CICS with C-language. Please respond to this question. Because i want to know whether CICS is compatible with C-language too??? |
|
Back to top |
|
|
|