Execution of COBOL code.
Execution of COBOL code.
Hi,
Is there a way to understadn how a COBOL mainframe program executes line by line? So that we know what is happning by what code?
Is there a way to understadn how a COBOL mainframe program executes line by line? So that we know what is happning by what code?
-
- Global Moderator
- Posts: 827
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Execution of COBOL code.
google for cobol debuggers
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
Re: Execution of COBOL code.
That's a way but any debugger we need to purchase, is it possible to see execution in some freely available debugger on a desktop PC?
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Execution of COBOL code.
Google is your friend. Googling free cobol debugger returns about 325,000 hits. It looks like, from the first page of results, that there is at least one but I didn't click on the link to confirm that.
- prino
- Registered Member
- Posts: 68
- Joined: Sun Jun 01, 2014 4:15 am
- Location: Vilnius, Lithuania
- Contact:
Re: Execution of COBOL code.
Real programmers know what is happening.
What would a debugger tell you if you traced "add a to b giving c" , or whatever the overlong syntax of COBOL requires?
Re: Execution of COBOL code.
I have been trying to understand if knowing the code behind the commands like MOVE and knowing Assembler can help me to understand COBOL better. As such it's not need for my career but to learn more.
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Execution of COBOL code.
Learning Assembler helps you understand what the COBOL code is doing and why sometimes there is a large difference in execution times based on the variables being used. Assembler knowledge helps in many areas of the mainframe.
I think this topic is pretty muddy at this point -- you started out asking about line-by-line execution of COBOL code (which requires a COBOL debugger) and now you're asking about Assembler. COBOL code is compiled into Assembler by the compiler, after which the assembled code runs through the linkage editor / binder to resolve calls to external modules (including COBOL subroutines among others), and out comes a load module that can be executed. A single COBOL statement may generate anywhere from one to many hundreds of Assembler statements so there is not a one-to-one correspondence between lines of COBOL and executed statements, and some statements (DISPLAY is a notable example) actually do most of their work in IBM subprograms that you can't see much of (since they are not provided as source code, only load modules).
I think this topic is pretty muddy at this point -- you started out asking about line-by-line execution of COBOL code (which requires a COBOL debugger) and now you're asking about Assembler. COBOL code is compiled into Assembler by the compiler, after which the assembled code runs through the linkage editor / binder to resolve calls to external modules (including COBOL subroutines among others), and out comes a load module that can be executed. A single COBOL statement may generate anywhere from one to many hundreds of Assembler statements so there is not a one-to-one correspondence between lines of COBOL and executed statements, and some statements (DISPLAY is a notable example) actually do most of their work in IBM subprograms that you can't see much of (since they are not provided as source code, only load modules).
- Anuj Dhawan
- Founder
- Posts: 2803
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Execution of COBOL code.
I agree with Robert. Line-by-line program execution and the underlying "generated assembler code" are two different animals in many ways - comparing them might end up as a futile effort.
On the other hand, if you are learning to debug the COBOL programs, you can use the COBOL compiler options shown in at this link in Table 1 to prepare your program for runtime debugging.
On the other hand, if you are learning to debug the COBOL programs, you can use the COBOL compiler options shown in at this link in Table 1 to prepare your program for runtime debugging.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute