Recommendation regarding INSPECT
Moderators: dbzTHEdinosauer, Moderator Group
Recommendation regarding INSPECT
Hello,
I heard there were some some INSPECT constructs that were not recommended but I do not know which ones. Could you tell me if it is true and then, why? Thanks in advance.
Regards,
I heard there were some some INSPECT constructs that were not recommended but I do not know which ones. Could you tell me if it is true and then, why? Thanks in advance.
Regards,
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
You going through all verbs one at a time?
Try it out yourself. On the web, often what you'll get is faith-in-own-opinion, which you then have to check on anyway.
If the site where you work has specific standards for INSPECT, check on those first. If not, what would you base "recommended" on? Understandability? Performance? The answer will not always be down to the constructs themselves.
Try it out yourself. On the web, often what you'll get is faith-in-own-opinion, which you then have to check on anyway.
If the site where you work has specific standards for INSPECT, check on those first. If not, what would you base "recommended" on? Understandability? Performance? The answer will not always be down to the constructs themselves.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Well, if you go with people's answers generally, you'll probably get "INSPECT is slow". 1) This is not always true. 2) This does not always matter.
But, that is the answer you will tend to get: INSPECT is slow. Or you can look at the manual and see how many variants of INSPECT are possible then consider that anyone just blandly saying "INSPECT is slow" without distinguishing between different uses of it probably doesn't have a real clue about anything.
But, that is the answer you will tend to get: INSPECT is slow. Or you can look at the manual and see how many variants of INSPECT are possible then consider that anyone just blandly saying "INSPECT is slow" without distinguishing between different uses of it probably doesn't have a real clue about anything.
Consider what INSPECT can/does do.
Now consider the code you would need to write inline with COBOL to do the same thing(s).
Very little question (to me) that INSPECT will perform better than the inline code for anything complex.
Much of what one "hears" is opinion rather than verified fact.
Now consider the code you would need to write inline with COBOL to do the same thing(s).
Very little question (to me) that INSPECT will perform better than the inline code for anything complex.
Much of what one "hears" is opinion rather than verified fact.
Have a good one
jeroc,
follow this link to the IBM Enterprise COBOL Version 4 Release 2
Performance Tuning manual. Then do a search on INSPECT.
http://www-01.ibm.com/support/docview.w ... wg27018287
I find that for character translations using INSPECT XXXX CONVERTING literal-1 TO literal-2 is more efficient in that it generates inline code rather than a call to a library routine.
Chuck H.
follow this link to the IBM Enterprise COBOL Version 4 Release 2
Performance Tuning manual. Then do a search on INSPECT.
http://www-01.ibm.com/support/docview.w ... wg27018287
I find that for character translations using INSPECT XXXX CONVERTING literal-1 TO literal-2 is more efficient in that it generates inline code rather than a call to a library routine.
Chuck H.
Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters)
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters)
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page