View previous topic :: View next topic
|
Author |
Message |
Vivek0410
New User
Joined: 24 Mar 2018 Posts: 2 Location: India
|
|
|
|
I was doing random search on SQLCA and I noticed that most of the articles refer to Length of SQLCA as Maximum Length of SQLCA.
So does the length vary and is not always 136 ? I am not sure how this is the case as SQLCA is just another variable.
And if the length is fixed (136), then what would be the significance of SQLCABC variable ? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
If you carefully observe SQLCA copybook and sum it then it is 136. and if you have any doubt then force abend the program by displaying SQLCA and check each variable and sum up too there to double check it matches 136 and it does. |
|
Back to top |
|
|
Vivek0410
New User
Joined: 24 Mar 2018 Posts: 2 Location: India
|
|
|
|
Thanks Rohit. Actually I knew the length of SQLCA is 136.
What I am unsure of is why on internet (Most of the technical forums), it is referred to as "Maximum Length of SQLCA".
Also, what is the significance of SQLCABC, which contains the length of SQLCA, if it is known that it is of 136 bytes. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
Also, what is the significance of SQLCABC, which contains the length of SQLCA, if it is known that it is of 136 bytes.
|
One day it may change so avoid specifying the exact figure and make your code future-proof. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
What I am unsure of is why on internet (Most of the technical forums), it is referred to as "Maximum Length of SQLCA".
|
Is it wrong to refer when it is right value?
Quote: |
Also, what is the significance of SQLCABC, which contains the length of SQLCA, if it is known that it is of 136 bytes. |
In case if we pass the SQLCA back to calling or called application then to check them the length of SQLCA =136 easier than calculating it again and there could be many more cases where it is required. I have personally never used it but many might have used it in past. |
|
Back to top |
|
|
|