You are here:

Cobol/Cobol code issues

Advertisement


Question
I have requirement.

My file is Flat File having account number and sequence number and some other data.

It is under sorted  on sequence number

suppose my file is like below:

ex:  accountno seq no amount
      A3221   1     100
      A3221   1     50
      A4335   2     60
      B5866   2     70

I have to read this data file sequentially and process each record.

Now if any record having the same sequence number and same account number we have to reject that account number it self from processing.If that is not happen process needs to be happen for that account.   

Can you pleas suggest the COBOL code for this?

Answer
Shravani,

I'm not going to write the program for you because this seems like a homework question to me.  And writing it for you wouldn't help you much *smile*.

What I suggest you do is step back to basics.  First thing to do is create a simple flowchart containing the logical steps you wish to perform.  It doesn't have to be in "code", just basic statements listing the task you need to perform at each step.

Once you have that, then you will be ready to start writing the proper COBOL code to support the logic flow you have crafted.

Good luck!

Cobol

All Answers


Answers by Expert:


Ask Experts

Volunteer


Robert Collins

Expertise

I currently work for Micro Focus and am directly involved in migrations from the IBM z/OS mainframe to the distributed platforms. I'm familiar with CICS, COBOL, DB2, JCL, SQL Server, Windows, Visual Studio, VB.Net, etc.

Experience

I currently work for Micro Focus and am directly involved in migrations from the IBM z/OS mainframe to the distributed platforms. I'm familiar with CICS, COBOL, DB2, JCL, SQL Server, Windows, Visual Studio, VB.Net, etc.

Publications
http://itsacobolworld.blogspot.com

Education/Credentials
Bachelor of Science in CIS from DeVry Institute

©2012 About.com, a part of The New York Times Company. All rights reserved.