毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率

上传人:cl****1 文档编号:473048231 上传时间:2023-09-26 格式:DOC 页数:50 大小:1.13MB
返回 下载 相关 举报
毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率_第1页
第1页 / 共50页
毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率_第2页
第2页 / 共50页
毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率_第3页
第3页 / 共50页
毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率_第4页
第4页 / 共50页
毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率_第5页
第5页 / 共50页
点击查看更多>>
资源描述

《毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率》由会员分享,可在线阅读,更多相关《毕业论文外文翻译使用COPYCALL和其他语句来提高编程效率(50页珍藏版)》请在金锄头文库上搜索。

1、使用COPY,CALL和其他语句来提高编程效率.Nancy Stern .Robert A. Stern .James P. Ley. 霍夫斯特拉大学 . 拿骚社区学院 . 威斯康星大学斯托特关键词:COPY, CALL, STRING, UNSTRING, OVERFLOW, POINTER, FD, OF, IN, PIC, IDENTIFICATION DIVISION, PROGRAM-ID, DATA DIVISION, REPLACING, BY, USING, PROCEDURE DIVISION, LINKAGE SECTION, WORKING-STORAGE SECTION

2、, EXIT PROGRAM, COBOL, STOP RUN, CALLING, DISPLAY,CONTENT, DELIMITED, VALUE, ACCEPT, ON, WITH, MOVE, SUBTRACT, INTO, ALL, END-UNSTRING. 参考文献:10th EDITION COBOL FOR THE 21ST CENTURY .Nancy SternHofstra University.Robert A. SternNassau Community College.James P. LeyUniversity of Wisconsin-StoutCopyrig

3、ht 2003by John Wiley & Sons, Inc.Improving Program Productivity Using The COPY, CALL, and Other StatementsOBJECTIVESTo familiarize you with1. The COPY statement for copying parts of a program that are stored in a library.2. The CALL statement for executing called programs as subroutines.3. Text mani

4、pulation with the STRING and UNSTRING statements.CONTENTSCOPY STATEMENTIntroductionEntries that Can Be CopiedAn ExampleThe Full Format for the COPY StatementCALL STATEMENTWhy Use a CALL Statement?Format of the CALL StatementCalled Program RequirementsCalling Program RequirementsExamplesTEXT MANIPULA

5、TION WITH STRING AND UNSTRING STATEMENTSThe STRING StatementThe Basic FormatOVERFLOW OptionPOINTER OptionGeneral Rules for Using the STRINGThe UNSTRING StatementThe Basic FormatGeneral Rules for Using the UNSTRINGEND-OF-CHAPTER AIDSChapter SummaryKey TermsCOPY STATEMENTINTRODUCTIONA COPY statement i

6、s used to bring into a program a series of prewritten COBOL entries that have been stored in a library. Copying entries from a library, rather than coding them, has the following benefits: (1) it could save a programmer a considerable amount of coding and debugging time; (2) it promotes program stan

7、dardization since all programs that copy entries from a library will be using common data-names and/or procedures; (3) it reduces the time it takes to make modifications and reduces duplication of effort; if a change needs to be made to a data entry, it can be made just one in the library without th

8、e need to alter individual programs; and (4) library entries are extensively annotated so that they are meaningful to all users; this annotation results in better-documented programs and systems.Most often, the COPY statement is used to copy FD and 01 entries that define and describe files and recor

9、ds. In addition, standard modules to be used in the PROCEDURE DIVISION of several programs may also be stored in a library and copied as needed.Organizations that have large databases or files that are shared make frequent use of libraries from which entries are copied. Students may also find that f

10、ile and record description entries for test data for programming assignments have been stored in a library, which may then be copied when needed.Each computer has its own machine-dependent operating system commands for creating and accessing a library. You will need to check you computer center for

11、the required entries.ENTRIES THAT CAN BE COPIEDWith the COPY statement, you may include prewritten ENVIRONMENT, DATA, or PROCEDURE DIVISION entries in your source programs as follows:ENVIRONMENT DIVISIONOption 1 (within the CONFIGURATION SECTION):SOURCE-COMPUTER. COPY text-namelibrary-name.OBJECT-CO

12、MPUTER. COPY text-namelibrary-name.SPECIAL-NAMES. COPY text-namelibrary-name.Option 2 (within the INPUT-OUTPUT SECTION):FILE-CONTROL. COPY text-namelibrary-name.I-O-CONTROL. COPY text-namelibrary-name.DATA DIVISIONOption 1 (within the FILE SECTION):FD file-name COPY text-namelibrary-name.Option 2 (w

13、ithin a File Description entry):01 data-name COPY text-namelibrary-name.PROCEDURE DIVISIONParagraph-name. COPY text-namelibrary-name.The library-name is an external-name. It should be 1 to 8 characters and include letters and digits only.AN EXAMPLESuppose we have created a library entry called CUSTO

14、MER that contains the following:01 CUSTOMER-REC.05CUST-NOPIC X(5).05CUST-NAMEPIC X(20).05CUST-ADDRESSPIC X(30).05CUST-BAL-DUEPIC 9(4)V99.To copy the entries in CUSTOMER into our source program, code the following at the point in the program where you want the entries to appear:COPY CUSTOMERThe sourc

15、e listing would appear as follows (we use lowercase letters for the copied library entries to distinguish them from the source program coding):The C following the source program line numbers indicates that these entries have been copied from a library. Some systems use an L (for library) or another letter to distinguish copied entries from programmer-supplied ones.As noted, other prewritten program entries beside

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号