COBOL User Groups COBOL COBOL Programming
Home | Search | Join COBUG | Call for User Group Leaders | Contact | About
COBOL Jobs | Submit Resumes | Post Jobs | COBOL Forums | Advertise with us

COBOL Resources

 >  Blogs
 >  Books
 >  COBOL Examples
 >  Courses
 >  Forums
 >  Knowledge Bases
 >  Magazines
 >  Manuals
 >  Portals
 >  Support
 >  Tutorials
 >  User Groups
 >  White Papers

COBOL Software

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

COBOL Information

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

On-Demand Webcast

Transform COBOL or PL/I Applications from IMS to DB2 (case study). Many organizations today are looking to consolidate their use of legacy databases around industry standard environments. BluePhoenix DBMSMigrator(tm) for IMS gives you the ability to incrementally migrate COBOL applications from IMS to DB2.

LogicMiner White Paper

COBOL Business Rule Mining: Get a Detailed Analysis of your COBOL Applications. This white paper introduces BluePhoenix(tm) LogicMiner, a COBOL analysis tool that can provide your organization with a detailed roapmap of your COBOL applications, including a dead code analysis.

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.

Application Understanding

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.

Mainframe Migration

Migrate your mainframe batch COBOL applications to open systems platforms, such as Windows, AIX and Linux, with OpenSCL. OpenSCL is a mainframe emulator that runs on a PC or server with Windows and Unix-based operating systems. OpenSCL is your batch COBOL applications mainframe migration solution.

Advertise With COBUG

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

COBOL Forums

 
IBM [ return ]
From Message
shamrea

 Email

2/07/2007
01:02:24
Subject: getting_started_with_cobol


Message:
hi everyone i am a new user of i-series or cobol/400..i have here a sample program and having a problem how to stop the loop because of my conditional statement "PERFORM UNTIL SELECTOR = "N"". BELOW IS MY SAMPLE PROGRAM.. PLS SOME ONE HELP ME.. THANK YOU. JOE
IDENTIFICATION DIVISION.
PROGRAM-ID. GETTINGSTARTED.
AUTHOR.

*THIS PROGRAM ACCPETS TWO NUMBERS AND AN OPERATOR FROM THE USER AND
*DEPENDING ON THE TYPE OF THE OPERATOR EITHER ADDS THE NUMBER OR MULTIPLY
*THEM TOGETHER AND DISPLAYS THE RESULTS

DATA DIVISION.

WORKING-STORAGE SECTION.
01 NUM1 PIC 999 VALUE ZERO.
01 NUM2 PIC 999 VALUE ZERO.
01 RESULT PIC 999 VALUE ZERO.
01 OPERATOR PIC X VALUE SPACE.
01 SELECTOR PIC X VALUE SPACE.

PROCEDURE DIVISION.
CALCULATOR.
PERFORM UNTIL SELECTOR = "N""
DISPLAY "INPUT FIRST NUMBER :"
ACCEPT NUM1
DISPLAY "INPUT SECOND NUMBER :"
ACCEPT NUM2
DISPLAY "INPUT OPERATOR (+ OR *) :"
ACCEPT OPERATOR

EVALUATE OPERATOR
WHEN "+"
COMPUTE RESULT = NUM1 + NUM2
DISPLAY "RESULT IS = " , RESULT

WHEN "*"
COMPUTE RESULT = NUM1 * NUM2
DISPLAY "RESULT IS = " , RESULT

WHEN OTHER
DISPLAY "ĪNVALID INPUT !!!"
END-EVALUATE
DISPLAY "TRY AGAIN? (Y/N)"
ACCEPT SELECTOR
END-PERFORM.
STOP RUN.


Arup Das

2/07/2007
06:03:59
RE: getting_started_with_cobol


Message:
I hope you are typing 'N' in caps, because the code is cheking for capital 'N'. It will loop if untill it gets capital 'N'

Arup


JoseFonseca

2/07/2007
06:31:55
RE: getting_started_with_cobol


Message:
You must ask SELECTION = 'N' not = "N"


JWL

2/07/2007
12:32:47
RE: getting_started_with_cobol


Message:
Include OR "n" for SELECTION = "N" OR "n"



P 1 Next Page >>


 
[ Go to Top of Page ]
COBOL XML - XMLThunder Ad
Fujitsu COBOL Compiler, Legacy Mainframe Migration - Fujitsu netCOBOL Ad
COBOL Code, Source Code - Source Recovery Company Ad
COBOL Migration - Ateras Ad
COBOL Legacy CICS Mainframe Migration - VTA Software Ad
COBOL Data Access - Parkway Ad
COBOL Legacy Mainframe Migration - CA Ad
COBOL Legacy Mainframe Migration - Transoft Ad
Unisys COBOL Legacy Mainframe Migration - Asysco Ad
COBOL Documentation, Application Understanding - Marble  Ad





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!



Job and Resume Matchmaker!
COBOL Jobs Employers submit your COBOL job openings. Job seekers submit your resumes.

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