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


 COBOL Jobs List:  Companies Using COBOL


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

COBOL Resources
 >  Blogs
 >  COBOL Books
 >  Computer Timeshare
 >  COBOL Examples
 >  Forums
 >  Knowledge Bases
 >  Magazines
 >  Manuals
 >  Portals
 >  Support
 >  COBOL Syntax/Commands
 >  COBOL Training
 >  COBOL 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
 >  COBOL Sort
 >  Terminal Emulators
 >  Test
 >  Tools
 >  Trans. Processing

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

COBOL Report Generator
Print graphics in COBOL reports with the reporting tool RPV Reports. Insert graphics (images, photos, logos, charts, etc.) in your plain text file COBOL reports to improve the quality of your reports. See how the report generator RPV Reports can be used to print graphics in your plain text COBOL reports.

Mainframe Training
The Mainframe COBOL Training Boot Camp is an intensive 10-day training course that allows you to function as a COBOL programmer in an IBM Enterprise mainframe environment. A comprehensive offering of instructor led online and onsite mainframe training courses are provided including COBOL, CICS, DB2, Easytrieve, FileAid, ISPF, JCL, VSAM, IMS, JES2, REXX, SysPlex, SMP/E, Xpeditor and z/OS, giving you the foundation to function as a mainframe programmer.

COBOL Analysis Tools
Analyze, debug and understand your COBOL programs with our set of COBOL Analysis Tools.

Analyze your COBOL programs with our Error Checker tool which checks for logic errors that are not detected by COBOL compilers.

Analyze the IF ELSE structure of your COBOL programs with our Nested If Analysis tool.

Understand the logic of your COBOL programs from top to bottom and bottom to top with our Top Down Logic Progression and Bottom Up Logic Regression tool.

Generate an easy to understand database cross reference listing with our ADABAS and DB2 File References tools.

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 sales leads. Contact COBUG at advertise@cobug.com for advertising rates.

Support COBUG
COBOL Donation Graphic
 

COBOL Write - Can you use Write AFTER and BEFORE commands together - COBOL Language Forum

 
COBOL Language [ return ]
From Message
ap-814

 Email

11/17/2009
12:19:05
Subject: after/before advancing


Message:
I'm a student and I need to print out a detail line after skipping a line after writing the previous record. I know you do this by
WRITE CUSTOMER-RECORD AFTER ADVANCING 2 LINES
But I also need to skip 2 lines after that.

Can I use the AFTER and BEFORE commands together somehow? I've tried
AFTER ADVANCING 2 LINES
BEFORE ADVANCING 3 LINES
and various combinations of that.

I still keep getting errors. How do I do this? Is there another way?

I should explain what I mean in more detail.
This is a program that has different levels of totals using control breaks. It prints out each detail line for one customer number in a region and then the totals for that customer. Then it prints out detail lines for the next customer number in the same region and then the totals for that customer. After the region number changes, it prints out another line for totals from the region, which includes all customer numbers in that region. At the very end, it prints out grand totals.
I'm fine with the control break logic and the program runs correctly. I'm only having trouble with the line spacing. The report layout I was given shows a blank line after the last detail line in each customer number record, then "TOTAL FOR CUSTOMER ######: ..." and then 2 blank lines before starting the detail lines for the next customer number.

Thank you for your help.


marco

11/17/2009
14:21:38
RE: after/before advancing


Message:
To print the required blank lines after your totals:

Move spaces to customer-record.
Write customer-record before advancing 2 lines.

i.e. it is o.k. to write blank print lines for spacing.


TURBOT

12/15/2009
09:22:15
RE: after/before advancing


Message:
NEVER use BEFORE ADVANCING and AFTER ADVANCING
together. As a matter of fact the BEFORE option is seldom even used.

To avoid excessive moves in the PROCEDURE DIVISION, in WORKING STORAGE code the following.

01 space-line pic x(132) value spaces.

Each time that you need to write spaces in the PROCEDURE DIVISION code

WRITE print-record from space-line after 2 or 3 etc.

Whats this "from" business? from = move spaces to
+
Only want to advance 1 line? One is the default so you're coding more than you need with after 1
You can probably guess that you can use the following option when advancing to the next page.

WRITE from space-line after page.



 
[ Go to Top of Page ]
Visual COBOL Ad
COBOL Documentation Tool - Marble COBOL on PC Ad
COBOL Applicatiom Modernization - Fresche Legacy Ad
COBOL Application Modernization - EvolveWare Ad
COBOL Interpreter - McKinney Ad
COBOL Sort, COBOL Tools - IRI, The CoSort Company Banner 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.

Join COBUG!

COBUG Become a part of COBUG and the global COBOL community today. Join Now ...

Forums

COBOL Forum Try our COBOL 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