IDENTIFICATION DIVISION.
PROGRAM-ID. CBLPARC1.
AUTHOR. SIMOTIME ENTERPRISES.
*****************************************************************
* Copyright (C) 1987-2005 SimoTime Enterprises, LLC. *
* *
* All rights reserved. Unpublished, all rights reserved under *
* copyright law and international treaty. Use of a copyright *
* notice is precautionary only and does not imply publication *
* or disclosure. *
* *
* Permission to use, copy, modify and distribute this software *
* for any non-commercial purpose and without fee is hereby *
* granted, provided the SimoTime copyright notice appear on all *
* copies of the software. The SimoTime name or Logo may not be *
* used in any advertising or publicity pertaining to the use *
* of the software without the written permission of SimoTime *
* Enterprises. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Enterprises. Once the fee is received by SimoTime *
* the latest version of the software will be delivered and a *
* license will be granted for use within an enterprise, *
* provided the SimoTime copyright notice appear on all copies *
* of the software. The SimoTime name or Logo may not be used *
* in any advertising or publicity pertaining to the use of the *
* software without the written permission of SimoTime *
* Enterprises. *
* *
* SimoTime Enterprises makes no warranty or representations *
* about the suitability of the software for any purpose. It is *
* provided "AS IS" without any express or implied warranty, *
* including the implied warranties of merchantability, fitness *
* for a particular purpose and non-infringement. SimoTime *
* Enterprises shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Enterprises *
* 15 Carnoustie Drive *
* Novato, CA 94949-5849 *
* 415.883.6565 *
* *
* RESTRICTED RIGHTS LEGEND *
* Use, duplication, or disclosure by the Government is subject *
* to restrictions as set forth in subparagraph (c)(1)(ii) of *
* the Rights in Technical Data and Computer Software clause at *
* DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of *
* Commercial Computer Software - Restricted Rights at 48 *
* CFR 52.227-19, as applicable. Contact SimoTime Enterprises, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Enterprises *
* Our e-mail address is: [email protected] *
* Also, visit our Web Site at http://www.simotime.com *
* *
*****************************************************************
*
*****************************************************************
* Source Member: CBLPARC1.CBL
*****************************************************************
*
* CBLPARC1 - This program will process a JCL parameter.
*
* CALLING PROTOCOL
* ----------------
* USE STANDARD PROCEDURE TO EXECUTE, RUN OR ANIMATE.
*
* DESCRIPTION
* -----------
* This program will process the JCL parameter from the PARM
* keyword of the EXEC staement.
*
* // EXEC PGM=PROGNAME,PARM='text string...'
*
* This program will simply display the text string.
*
****************************************************************
*
* MAINTENANCE
* -----------
* 1997/02/27 Simmons, Created program.
*
*****************************************************************
*
DATA DIVISION.
WORKING-STORAGE SECTION.
*
*****************************************************************
* Data-structure for Title and Copyright...
* ------------------------------------------------------------
01 SIM-TITLE.
05 T1 pic X(11) value '* CBLPARC1 '.
05 T2 pic X(34) value 'Sample, Process a JCL Parameter '.
05 T3 pic X(10) value ' v03.12.02'.
05 T4 pic X(24) value ' http://www.simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* CBLPARC1 '.
05 C2 pic X(20) value 'Copyright 1987-2005 '.
05 C3 pic X(28) value ' SimoTime Enterprises, LLC '.
05 C4 pic X(20) value ' All Rights Reserved'.
01 SIM-THANKS-01.
05 C1 pic X(11) value '* CBLPARC1 '.
05 C2 pic X(32) value 'Thank you for using this sample '.
05 C3 pic X(32) value 'by SimoTime Enterprises, LLC '.
05 C4 pic X(04) value ' '.
01 SIM-THANKS-02.
05 C1 pic X(11) value '* CBLPARC1 '.
05 C2 pic X(32) value 'Please send comments or suggesti'.
05 C3 pic X(32) value 'ons to [email protected] '.
05 C4 pic X(04) value ' '.
01 FIRST-TIME pic X value 'Y'.
01 MESSAGE-BUFFER.
05 MESSAGE-HEADER pic X(11) value '* CBLPARC1 '.
05 MESSAGE-TEXT pic X(128).
01 MESSAGE-TEXT-01.
05 filler pic X(20) value 'Parameter length is '.
05 JCL-PARM-LENGTH pic 9(5) value 0.
*****************************************************************
LINKAGE SECTION.
01 PARM-BUFFER.
05 PARM-LENGTH pic S9(4) comp.
05 PARM-DATA pic X(256).
*****************************************************************
PROCEDURE DIVISION using PARM-BUFFER.
if FIRST-TIME not = 'N'
perform Z-POST-COPYRIGHT
move 'N' to FIRST-TIME
end-if
add PARM-LENGTH to ZERO giving JCL-PARM-LENGTH
move MESSAGE-TEXT-01 to MESSAGE-TEXT
perform Z-POST-MESSAGE
if PARM-LENGTH > 0
move PARM-DATA(1:PARM-LENGTH) to MESSAGE-TEXT
perform Z-POST-MESSAGE
end-if
perform Z-THANK-YOU.
GOBACK.
*****************************************************************
* Display Copyright or Program Messages...
*****************************************************************
Z-POST-COPYRIGHT.
display SIM-TITLE upon console
display SIM-COPYRIGHT upon console
exit.
*****************************************************************
Z-POST-MESSAGE.
display MESSAGE-BUFFER upon console
move SPACES to MESSAGE-TEXT
exit.
*****************************************************************
Z-THANK-YOU.
display SIM-THANKS-01 upon console
display SIM-THANKS-02 upon console
exit.
*****************************************************************
* This example is provided by SimoTime Enterprises *
* Our e-mail address is: [email protected] *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
¤ Dauer der Verarbeitung: 0.22 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.
|