Top
NetCOBOL V11.0 Syntax Samples
FUJITSU Software

Preface

As COBOL has grown and evolved, many new features have been added to the base language. Quite often, these are features that are in the draft version of the next COBOL standard. Other times, the features were added in response to user requests.

Often, features that have been part of the COBOL language are unused because they are not properly understood. Examples of actual COBOL statement usage are invaluable in helping the programmer figure out how to use a particular COBOL feature.

This manual, used in conjunction with the Language Reference Manual, provides syntax samples for several clauses and statements in order to clarify their usage. The syntax samples will be comparatively easy to understand because each sample has been kept to around 50 lines. This manual also introduces some coding techniques for more effective use. When introduced, these techniques are noted by text such as "This example shows an effective way of using this function".

Audience

Prior to using NetCOBOL it is assumed that you have the following knowledge:

How This Manual is Organized

This manual contains the following information.

COBOL Syntax Samples

Various sample programs illustrating the use of a variety of COBOL statements. Many of these are standard COBOL, and others are extensions offered by NetCOBOL.

Conventions Used in This Manual

System-specific Function

Some parts of the COBOL common syntax described in this manual depend on system functions, and differ among systems.

Such parts are indicated by the following system names:

Indication

Corresponding system

Corresponding product

HP

HP-UX

COBOL85 V20L11

Solaris

Oracle Solaris

NetCOBOL V10

Linux

Red Hat(R) Enterprise Linux(R) 5(for x86)

Red Hat(R) Enterprise Linux(R) 5(for Intel64) 32bit

NetCOBOL (32bit) V7.3

LinuxIPF

Red Hat(R) Enterprise Linux(R) 5(for Intel Itanium)

NetCOBOL V9.0

Linux64

Red Hat(R) Enterprise Linux(R) 6(for Intel64) 64bit

Red Hat(R) Enterprise Linux(R) 7(for Intel64) 64bit

NetCOBOL V11

Win32

Windows Server 2012 R2

Windows Server 2012

Windows Server 2008 R2

Windows 8.1

Windows 8

Windows 7

NetCOBOL V11

Winx64

Windows Server 2012 R2

Windows Server 2012

Windows Server 2008 R2

Windows 8.1 (x64)

Windows 8 (x64)

Windows 7 (x64)

NetCOBOL V11

.NET

Windows Server 2012 R2

Windows Server 2012

Windows Server 2008 R2

Windows 8.1

Windows 8

Windows 7

NetCOBOL for .NET V6

Product Names

Product Name

Abbreviation

Red Hat(R) Enterprise Linux(R) 6 (for Intel64)

Red Hat(R) Enterprise Linux(R) 7 (for Intel64)

Linux(x64)

Microsoft® Windows Server® 2012 R2 Datacenter

Microsoft® Windows Server® 2012 R2 Standard

Microsoft® Windows Server® 2012 R2 Essentials

Microsoft® Windows Server® 2012 R2 Foundation

Windows Server 2012 R2

Microsoft® Windows Server® 2012 Datacenter

Microsoft® Windows Server® 2012 Standard

Microsoft® Windows Server® 2012 Essentials

Microsoft® Windows Server® 2012 Foundation

Windows Server 2012

Microsoft® Windows Server® 2008 R2 Foundation

Microsoft® Windows Server® 2008 R2 Standard

Microsoft® Windows Server® 2008 R2 Enterprise

Microsoft® Windows Server® 2008 R2 Datacenter

Windows Server 2008 R2

Windows® 8.1

Windows® 8.1 Pro

Windows® 8.1 Enterprise

Windows 8.1

or

Windows 8.1 (x64)

Windows® 8

Windows® 8 Pro

Windows® 8 Enterprise

Windows 8

or

Windows 8 (x64)

Windows® 7 Home Premium

Windows® 7 Professional

Windows® 7 Enterprise

Windows® 7 Ultimate

Windows 7

or

Windows 7 (x64)

Oracle Solaris

Solaris

Trademarks

Export Regulation

Exportation/release of this document may require necessary procedures in accordance with the regulations of your resident country and/or US export control laws.


The contents of this manual may be revised without prior notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Fujitsu Limited.


August 2015

Copyright 1996-2015 FUJITSU LIMITED