COBOL User Groups COBOL COBOL Programming
Home | Search | COBOL Forums | Join COBUG | Change COBUG Account | Donations | Advertise with us | Contact us | About us | Site Map

 COBOL Jobs List:  Companies Using COBOL
 Programming Software:  DCD III - COBOL Program Documentation | RPV - Graphical COBOL Print


COBOL Jobs

 >  COBOL Job Listing
 >  COBOL Job Seekers
 >  Post COBOL Jobs
 >  Interview Questions
 >  Job Resources

COBOL Resources

 >  Blogs
 >  Books
 >  Computer Timeshare
 >  COBOL Examples
 >  Forums
 >  Knowledge Bases
 >  Magazines
 >  Manuals
 >  Portals
 >  Support
 >  Syntax/Commands
 >  Training
 >  Tutorials
 >  User Groups
 >  White Papers

COBOL Software

 >  Change Management
 >  COBOL Compilers
 >  Data Access
 >  Database
 >  Documentation
 >  COBOL Editors
 >  File Conversion
 >  GUI
 >  Legacy Migration
 >  Legacy Modernization
 >  Mainframe Security
 >  Report Generators
 >  Sort
 >  Terminal Emulators
 >  Test
 >  Tools
 >  Trans. Processing

COBOL Information

 >  Events
 >  News Articles
 >  Newsletters
 >  Product News
 >  COBOL Standards

COBOL Report Generator

Print graphical COBOL reports in Windows with RPV Reports. Insert graphics (images, photos, logos, charts, etc.) into your COBOL reports to improve the print quality of your COBOL reports. See how RPV Reports can be used to preview or print graphical COBOL reports in Windows.

COBOL Documentation

Are your mainframe COBOL applications properly documented? DCD III is a comprehensive COBOL documentation and application understanding tool that will allow you to reduce COBOL maintenance, development, and mainframe migration costs. Learn more about how you can document and understand your mainframe COBOL applications with DCD III.

COBOL Email List Rental

You can reach a highly targeted, qualified, opt-in audience of COBOL users by renting the COBUG email list. Contact us today advertise@cobug.com for our email list rental rates.

Website Advertisement

Advertise on the COBUG website and reach tens of thousands of COBOL users. Increase your COBOL sales leads. Contact COBUG at advertise@cobug.com for advertising rates.

Support COBUG

COBOL Donation
 

COBOL Forums

 
Micro Focus [ return ]
From Message
NowhereMan

 Email

2/15/2011
11:43:12
Subject: Capture Signed Number


Message:
Hello folks,
I'm trying to capture a signed number from a file but i'm having mixed results so far. Here's what i have

05 CP-IND PIC X(01).
05 CP-BALANCE PIC S9(16)V99.
What i'm trying to do is, when BALANCE is a negative number, change the value of WS-IND as follows:
IF CP-BALANCE < ZEROS
DISPLAY "NEGATIVE" AT 0910
ACCEPT ACC-W
IF CP-IND = 'D'
MOVE 'C' TO REGI155-IND-DC-INI
ELSE
MOVE 'D' TO REGI155-IND-DC-INI
ELSE
MOVE BOCT02DC TO REGI155-IND-DC-INI
END-IF.

I have a report to know wich accounts have negative values and to check for errors, and i notice that the if does not find all the accounts that have negative values, as it should, just a few.
I moved the BALANCE to a display variable such as
BAL-D PIC ZZZZZZZZZZ.ZZZ.ZZ9,99-

even so, it just show the same few and doesn't show me the signs for all off the accounts.

How can i make sure that i'm obtaining and display all the signs correctly?

Thanks for the attention.





tim bonham

2/15/2011
15:32:49
RE: Capture Signed Number


Message:
Well, you don't really give us enough info to answer your question.

But right off, you have 2 IFs but only 1 END-IF. That could be a problem. It's certainly bad coding style.



jens611

2/15/2011
22:27:30
RE: Capture Signed Number


Message:
Take care of num edited fields. If you have
77 BAL-D PIC ZZZZZZZZZZ.ZZZ.ZZ9,99-
and code something like
if BAL-D = ZERO then
...
end-if ,
the if statement will never be executed!
Jens


NowhereMan

2/16/2011
05:46:12
RE: Capture Signed Number


Message:
Oh, i just forgot to put the END IF here, my bad.
In the end it was a file problem, i picked up an previous version and there was no such problem.

Thank you all!


 
[ Go to Top of Page ]
Visual COBOL - Micro Focus Banner Ad
Mainframe Applications - SysperTec Banner Ad
COBOL Migration, Application - MigrationWare Ad
Legacy Migration and Modernization - Ateras Banner Ad
Micro Focus COBOL Download - Micro Focus Ad











COBOL Job Seekers
COBOL Jobs Looking for a COBOL job? Submit your resume here and have it viewed by employers and recruiters hiring for COBOL positions.

Employers & Recruiters
Post COBOL Jobs Do you need to fill a COBOL position? Post your COBOL jobs here and find the most qualified COBOL candidates to fill your COBOL position.

Call for Articles
COBOL Newsletters Articles are being sought for the COBUG newsletters.
Will you help us in our efforts to provide newsletters for the COBOL community at large? Contribute to the COBUG newsletters! Answer this call for COBOL and related legacy articles.

Local COBOL User Groups
COBOL User Group Check out the list of local COBOL user groups from around the world and join a user group near you.


Call for User Group Leaders!
COBOL User Groups Get Involved! We are looking for user group leaders to help organize and coordinate a local COBOL user group.

Join COBUG!
COBOL User Groups Become a part of the COBUG community today. Join Now ...


COBOL Forums
COBOL Forum Try our forums for help!
Let the COBUG members help you. Post your issues!



[Go to Top of Page]


COBOL (c) Information Computing Services. All Rights Reserved. COBOL