Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 20th, 2007, 11:29 PM
Registered User
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Flow chart of Cobol program in dotNet

1. How to reposition the pointer

We are developing a program in dotNet to plot a flow chart for a COBOL program which is considered as the input file.

                The idea is, the dot net program should plot the symbols according to the COBOL verb. For example when the program come across a verb, READ, it draws a parallelogram, when it come across a MOVE statement, it draws a rectangle, and when it come across an 'IF' or 'PERFORM UNTIL' it plots a decision box. We are able to plot the things properly when all the code is purely sequential.

     Now the situation is we can have many paragraphs calling from the main paragraph. In this case code is not sequential. Here is an example.

Cobol code
procedure division.
        perform b000-accept-para.
        perform c000-calculate-para.
        perform d000-result-para.
        stop run.
        display "enter the value of x and n".
        accept ws-x-e.
        accept ws-n.
        move ws-x-e to ws-x.
        perform c100-mult-term-para varying ws-i from 1 by 1
                until ws-i > ws-n.
        compute ws-temp = ws-temp * ws-x / ws-i.
        compute ws-result = ws-result + ws-temp.
     display ws-result.
     move ws-result to ws-result-e.
     display ws-result-e.

             Question is, control first comes to the PERFORM

Then we can write the logic to find an equivalent term for b000-accept-para, and control goes to the actual b000-accept-para. We can plot everything mentioned in b000-accept-para. That is

display "enter the value of x and n".
        accept ws-x-e.
        accept ws-n.

But next, the control have to go back to the next perform in the main para. That is "perform c000-calculate-para". This is going back to position in the top. How we can do this reposition of the pointer in dotNET..?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flow chart coding in Visual Studio mughrabi Visual Studio 2005 0 June 29th, 2007 02:15 AM
Program Flow Interrupted By IF...THEN Statement squeege321 Pro VB 6 10 March 23rd, 2007 11:38 AM
Flow of the Program ? pandian Java Basics 2 March 20th, 2006 11:07 PM
weird program flow with nested loops zayasv Intro Programming 2 November 17th, 2005 06:19 AM
weird program flow with nested functions zayasv VB.NET 0 October 26th, 2005 11:17 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.