IDENTIFICATION DIVISION. 
      *****************************************************************
      * COBOLScript 3.0 Sample COBOL Program                          *
      * Copyright (c) Deskware, Inc. 1996-00                          *
      *                                                               *
      * THIS IS A SAMPLE PROGRAM USED TO DEMONSTRATE THE USE OF THE   *
      * "GETCMDLINE"  THE "GETCMDLINE" COMMAND RETREIVES THE          *
      * PARAMETERS PASSED ON THE URL LINE.   EACH PARAMETER IS STORED *
      * IN THE CMDLINE_ARGS VARIABLE WITH THE TOTAL NUMBER OF         *
      * OF PARAMETERS PASSED IN THE CMDLINE_TOTAL FIELD.              *
      *                                                               *
      * Syntax Form:   GETCMDLINE  .            *
      *                                                               *
      *                                                               *
      *****************************************************************
       PROGRAM-ID.      GETCMDLINE.CBL.
       AUTHOR.          DESKWARE.

       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE COMPUTER. WINDOWS.  
       OBJECT COMPUTER. WINDOWS.  

       DATA DIVISION.
      *****************************************************************
      * VARIABLE DECLARATIONS                                         *
      *****************************************************************
       WORKING-STORAGE SECTION.

       01  CMDLINE_TOTAL               PIC 9(05).
       01  CMDLINE_ARGS                OCCURS 10 TIMES.
           03  ARG                     PIC X(100).

       01  SUB                         PIC 9(05).


       PROCEDURE DIVISION.
      *****************************************************************
      * MODULE:       0000-MAIN                                       *
      *                                                               *
      * DESCRIPTION:  THIS MODULE IS THE MAIN DRIVER FOR THIS PROGRAM.*
      *               IT WILL SHOW HOW TO USE THE "GETCMDLINE"        *
      *               AND HOW TO RETREIVE THE ARGUMENTS PASSED TO THE *
      *               PROGRAM ON THE URL LINE.                        *
      *                                                               *
      *****************************************************************
       MAIN.
           DISPLAY `This program demonstrates the GETCMDLINE command`.
        
           GETCMDLINE cmdline_total cmdline_args.
           DISPLAY cmdline_total.
           DISPLAY cmdline_args.

           PERFORM DISPLAY-ARG
             VARYING SUB FROM 1 BY 1
             UNTIL SUB > CMDLINE_TOTAL.


       DISPLAY-ARG.

           DISPLAY ARG(SUB).