Skip to main content

Problem:

This example illustrates how to format and use long file names with call-by-name routines.

Resolution:

===========

INTRODUCTION

==========

This example illustrates how to format and use long file names with call-by-name routines.

SOURCE FILES:

=========

Program Files     Description

----------------     -----------------------------------------------------------

Cbnrndlf.cbl       Example program that uses call-by-name routines and long file names.

OPERATION:

========

Rebuild the example program and then Animate the program. As you step through the program you will see that the text file in the project directory (LongFileName.txt) is copied and assigned the name "CopiedFile.txt". Next, the new file is renamed "RenamedFile.txt". Finally, the new file is

deleted.

NOTE:

====

The three constants that follow provide three long file names for use with this example. Note how each constant value is formed. The entire literal value is enclosed by apostrophes. The long file name within the literal is enclosed by quotes. Between the final quote enclosing the file name and the apostrophe ending the literal is a space character.

i.e. apostrophe quote file-name quote space apostrophe.

       78  filename1 value '"LongFileName.txt" '.

       78  filename2 value '"CopiedFile.txt" '.

       78  filename3 value '"RenamedFile.txt" '.

==========================================================

Keywords: demonstration, sample, example, demo, cbnrndlf.zip

demo.ex

demo.ne

Attachments:

cbnrndlf.zip

Old KB# 3993