Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Confusion regarding length of SQLCA variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Vivek0410

New User


Joined: 24 Mar 2018
Posts: 2
Location: India

PostPosted: Thu Oct 18, 2018 2:20 pm    Post subject: Confusion regarding length of SQLCA variable
Reply with quote

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

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2038
Location: NY,USA

PostPosted: Sat Oct 20, 2018 1:58 am    Post subject:
Reply with quote

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

New User


Joined: 24 Mar 2018
Posts: 2
Location: India

PostPosted: Mon Oct 22, 2018 12:36 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 10 May 2007
Posts: 2108
Location: UK

PostPosted: Mon Oct 22, 2018 1:00 pm    Post subject: Reply to: Confusion regarding length of SQLCA variable
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 2038
Location: NY,USA

PostPosted: Tue Oct 23, 2018 11:15 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts AFP duplex page containing variable data jose angel santamaria IBM Tools 0 Wed Jul 18, 2018 12:35 pm
No new posts Limit in Length for a CICS START seahawk789 CICS 6 Mon Apr 02, 2018 8:34 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us