Chapter 12: Keywords

This chapter contains information on using keywords including their placement in code, the structures themselves, and programming commands.


Placement in Code

The following samples include all APS keywords that you can enter in the Program Painter or Specification Editor when creating online or batch programs. They illustrate:

Online programs

*SYM1 keyword places Customization Facility code here
*user macros from Appl. Painter, Location = T
*SYM2 keyword places Customization Facility code here
 
 IDENTIFICATION DIVISION.  
    .
    .
    .
*/* keyword places comments here (COBOL/2)
 REMARKS.  REM keyword places comments here (COBOL)
 
 ENVIRONMENT DIVISION.  
    .
    .
    .
 SPECIAL-NAMES.  SPNM keyword places code here
*SYEN keyword places Customization Facility code here
 
 DATA DIVISION.  
*SYDD keyword places Customization Facility code here
 
 WORKING-STORAGE SECTION.  
*user macros     from Appl. Painter, Location = WT
*data structures from Appl. Painter, Location = WT
*user macros     from Appl. Painter, Location = WS
*SYWS keyword places Customization Facility code here
 
*
WS  keyword, followed by any of the following six 
*    keywords that you enter on the next line, 
*    places code here:
*01   keyword
*REC  keyword
*DS   keyword
*SQL  keyword
*++   keyword
*FRFM keyword
 
*user macros from Appl. Painter, Location = WB
*CA, CA05, CADS keywords place code here in CICS, DDS, IMS, 
*    ISPF Dialog, and PM parent pgms
 
 LINKAGE SECTION.  
*user macros     from Appl. Painter, Location = LT
*data structures from Appl. Painter, Location = LK
*user macros     from Appl. Painter, Location = LK
*SYLT keyword places Customization Facility code here
*SYLK keyword places Customization Facility code here
 
*LK  keyword, followed by any of the following six 
*    keywords that you enter on the next line, 
*    places code here:  
*01   keyword
*DS   keyword
*REC  keyword
*SQL  keyword
*++   keyword
*FRFM keyword
 
*CA, CA05, CADS keywords place code here in ISPF 
     and PM child pgms
*user macros     from Appl. Painter, Location = LB
 
 PROCEDURE DIVISON.  NTRY|PROC keyword generates this stmt
*OPT keyword places code here
    .
    .
*PARA keyword places code here
    .
    .
*STUB keyword places code here
    .
    .
*user macros from Appl. Painter, Location = B
*SYBT keyword places Customization Facility code here
*End of program.  

Batch programs

*SYM1 keyword places Customization Facility code here
*user macros from Appl. Painter, Location field = T
*SYM2 keyword places Customization Facility code here
 
 IDENTIFICATION DIVISION.  
    .
    .
 REMARKS.  REM keyword places comments here
 
 ENVIRONMENT DIVISION.  
    .
    .
 SPECIAL-NAMES.  SPNM keyword places code here
*SYEN keyword places Customization Facility code here
 
 INPUT-OUTPUT SECTION.  
*user macros from Appl. Painter, Location field = IO
*SYIO keyword places Customization Facility code here
 
 FILE-CONTROL.  
*IO   keyword places code here
    .
    .
 DATA DIVISION.  
*SYDD keyword places Customization Facility code here
 
 FILE SECTION.  
*user macros from Appl. Painter, Location field = FD
*FD keyword places code here
*SD keyword places code here
 
 WORKING-STORAGE SECTION.  
*user macros     from Appl. Painter, Location field = WT
*data structures from Appl. Painter, Location field = WT
*user macros     from Appl. Painter, Location field = WS
*SYWS keyword places Customization Facility code here
 
*WS  keyword, followed by any of the following six 
*    keywords that you enter on the next line, 
*    places code here:
*01   keyword
*REC  keyword
*DS   keyword
*SQL  keyword
*++   keyword
*FRFM keyword
 
*user macros from Appl. Painter, Location field = WB
 
 LINKAGE SECTION.  
*user macros     from Appl. Painter, Location field = LT
*data structures from Appl. Painter, Location field = LK
*user macros     from Appl. Painter, Location field = LK
*SYLT keyword places Customization Facility code here
*SYLK keyword places Customization Facility code here
 
*LK  keyword, followed by any of the following six 
*    keywords that you enter on the next line, 
*    places code here:  
*01   keyword
*DS   keyword
*REC  keyword
*SQL  keyword
*++   keyword
*FRFM keyword
 
*user macros     from Appl. Painter, Location field = LB
 
 PROCEDURE DIVISON.         /*NTRY keyword generates this stmt
 PROCEDURE DIVISON USING... /*PROC keyword generates this stmt
 
 DECLARATIVES.          /* DECL keyword generates this stmt
 DECLARATIVES SECTION.  /* DPAR generates this stmt
*DPAR keyword places code here
 END DECLARATIVES.
 
*OPT keyword places code here
    .
    .
    .
*PARA keyword places code here
    .
    .
    .
*STUB keyword places code here
    .
    .
    .
 
*user macros from Appl. Painter, Location field = B
*SYBT keyword places Customization Facility code here
*End of program.  

Structures

++

-KYWD-  12-*----20---*----30---*----40---*----
 ++     PANVALETmembername

01

Format 1, define input or output files:

-KYWD-  12-*----20---*----30---*----40---*----50---*----60
 IO     filename ASSIGN [TO] ...
        ORGANIZATION IS ...
 01     input|outputrecordname         PIC clause

Format 2, define a data structure:

-KYWD-  12-*----20---*----30---*----40---*----50---*----60
 01     COBOLdatastructure
        [05  COBOLdatastructure]

Format 3, copy a data structure:

-KYWD-  12-*----20---*----30---*----40---*----50---*----60
 01     COBOLcopystatement

Format 4, define Report Writer line types:

-KYWD-  12-*----20---*----30---*----40---*----
 01     [dataname] TYPE [IS] reportgroup
        Report Writer statements

CA

Format 1:

-KYWD-  12-*----20---*----30---*----40---*----
 CA     datastructure

Format 2

-KYWD-  12-*----20---*----30---*----40---*----
 CA05   COBOLdatastructure

Format 3:

-KYWD-  12-*----20---*----30---*----40---*----
 CADS   datastructurename

DECL

-KYWD-  12-*----20---*----30---*----40---*----
 DECL   declarativestatements

DPAR

-KYWD-  12-*----20---*----30---*----40---*----
 DPAR   sectionname SECTION
        USE declarativesentence
[DPAR   paragraphname
            paragraphstatements ]

DS

-KYWD-  12-*----20---*----30---*----40---*----
 DS[nn]   datastructurename

FD

Format 1:

-KYWD-  12-*----20---*----30---*----40---*----
 FD     filename
       [filedescriptionstatement]

Format 2:

-KYWD-  12-*----20---*----30---*----40---*----
 FD     filename
       [filedescriptionstatement]
        REPORT IS|REPORTS ARE report1 [... report15]

FRFM

Format 1, for Working-Storage and Linkage Sections only:

-KYWD-  12-*----20---*----30---*----40---*----50---*----60
 FRFM   COBOLstatements|S-COBOLstatements

Format 2, for Procedure Division only:

-KYWD-  12-*----20---*----30---*----40---*----50---*----60
        ENTER COBOL|ENTER S-COBOL|++INCLUDE membername
        COBOLstatements|S-COBOLstatements

IDCS

-KYWD-  12-*----20---*----30---*----40---*----
 IDCS   IDMSControlSectionstatements

IDSS

-KYWD-  12-*----20---*----30---*----40---*----
 IDSS   IDMSSchemaSectionstatements

IO

Format 1:

-KYWD-  12-*----20---*----30---*----40---*----
 IO     COBOLselectstatement
        IOstatement

Format 2:

-KYWD-  12-*----20---*----30---*----40---*----
 IO     ASSIGN [TO] COBOLdataname
                    "literal"
                    EXTERNAL externalfile
        ORGANIZATION IS LINE|RECORD SEQUENTIAL

LK

-KYWD-  12-*----20---*----30---*----40---*----
 LK
 kywd  associated data structure

MOCK

-KYWD-  12-*----20---*----30---*----40---*----
 MOCK   mockupname

NTRY

See Data Communication Calls.

OPT

-KYWD-  12-*----20---*----30---*----40---*----
 OPT    PROG

PARA

Format 1:

-KYWD-  12-*----20---*----30---*----40---*----
 PARA   paragraphname [SECTION]
        paragraphcode

Format 2:

-KYWD-  12-*----20---*----30---*----40---*----
 PARA   paragraphname(argument1,argument2,
        ... argument3, ... argumentN)
        paragraphcode

PROC

-KYWD-  12-*----20---*----30---*----40---*----
 PROC  [variablename1 variablename2 ... variablenameN]

REC

-KYWD-  12-*----20---*----30---*----40---*----
 REC    datastructure

RED

-KYWD-  12-*----20---*----30---*----40---*----
 RED    reportname

REM

-KYWD-  12-*----20---*----30---*----40---*----
 REM    commentline1
   .
   .
   .
 REM    commentlineN

SD

-KYWD-  12-*----20---*----30---*----40---*----
 SD     sortfilename
       [sortdescription]

SPNM

-KYWD-  12-*----20---*----30---*----40---*----
 SPNM   statement

SQL

-KYWD-  12-*----20---*----30---*----40---*----
 SQL    SQLdatastructurestatement

STUB

-KYWD-  12-*----20---*----30---*----40---*----
 STUB   stubname

SY Macro Keywords

-KYWD-  12-*----20---*----30---*----40---*----
 SYBT   macrocode
 SYEN   macrocode
 SYDD   macrocode
 SYFD   macrocode
 SYIO   macrocode
 SYLK   macrocode
 SYM1   macrocode
 SYM2   macrocode
 SYRP   macrocode
 SYWS   macrocode

WS

-KYWD-  12-*----20---*----30---*----40---*----
 WS
 kywd  associated data structures

Programming Commands

Enter the following commands in the Command field on Program Painter or Specification Painter.

Command
Description

CONVERT|CONV

Convert code to preview results of generation.

DATA|DS datastructurename

Transfer to named data structure in Data Structure Painter. END returns to invoking painter.

REPT|RP reportname

Transfer to Report Mock-Up Painter and display specified mock-up. END returns to invoking painter.

UNCONV|UNC

Cancel the effects of, or unconvert, the CONVERT command. Required after CONVERT.

VALIDATE|VAL

Validate syntax and display error messages.

 


Copyright © 2002 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.