ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaiq_5.4.0.1/rzaiqcrtclpgm.htm

86 lines
5.7 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="task" />
<meta name="DC.Title" content="Example: Create a CL program to start FTP" />
<meta name="DC.Relation" scheme="URI" content="rzaiqbatchftpcomplx.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaiqcrtclpgm" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Example: Create a CL program to start FTP</title>
</head>
<body id="rzaiqcrtclpgm"><a name="rzaiqcrtclpgm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Create a CL program to start FTP</h1>
<div><div class="section"><ol><li>As shown in the previous example, FTP uses the display station for command
INPUT and message OUTPUT, and this needs to be overridden for use in batch
mode. We use the OVRDBF command to overwrite these files with the ones to
be used in batch: <pre> OVRDBF FILE(INPUT) TOFILE(GERRYLIB/QCLSRC) MBR(FTPCMDS)
OVRDBF FILE(OUTPUT) TOFILE(GERRYLIB/QCLSRC) MBR(FTPLOG) </pre>
</li>
<li>A host name or an internet address is a required parameter for the STRTCPFTP
command that is included in the CL program file. However, if one wants to
specify the remote systems in the input commands file instead of the CL program
file, then a dummy host name must be specified for the STRTCPFTP command to
satisfy the required syntax. This dummy name can be a fictitious host name
or a real host name. If it is a real name, then the first entry in the input
commands file must be a user ID and a password, and the second entry must
be the CLOSE subcommand. If it is not a real host name, then these entries
are not required, and the first entry should be an OPEN subcommand to connect
to the required server system. <pre> FTP RMTSYS(LOOPBACK) </pre>
FTP processes the input file and writes messages to the output
file (FTPLOG).</li>
<li>After the FTP application ends, delete the overrides: <pre> DLTOVR FILE(INPUT OUTPUT) </pre>
<p>The CL program for batch FTP will look like the following example,
in Figure 1, on system SYSNAM01:</p>
<div class="note"><span class="notetitle">Note:</span> By using the code examples, you
agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
<div class="fignone" id="rzaiqcrtclpgm__figftpclp"><a name="rzaiqcrtclpgm__figftpclp"><!-- --></a><span class="figcap">Figure 1. CL program FTPBATCH for batch FTP</span><pre class="screen"> ___________________________________________________________________________________
| |
| Columns . . . : 1 71 Browse GERRYLIB/QCLSRC |
| SEU==&gt; FTPBATCH |
| FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 |
| *************** Beginning of data ************************************* |
| 0001.00 PGM |
| 0002.00 OVRDBF FILE(INPUT) TOFILE(GERRYLIB/QCLSRC) + |
| 0003.00 MBR(FTPCMDS) |
| 0004.00 OVRDBF FILE(OUTPUT) TOFILE(GERRYLIB/QCLSRC) + |
| 0005.00 MBR(FTPLOG) |
| 0006.00 FTP RMTSYS(LOOPBACK) /* (FTP CL Program) */ |
| 0007.00 DLTOVR FILE(INPUT OUTPUT) |
| 0008.00 ENDPGM |
| ****************** End of data **************************************** |
| |
| |
| F3=Exit F5=Refresh F9=Retrieve F10=Cursor F12=Cance |
| F16=Repeat find F24=More keys |
| (C) COPYRIGHT IBM CORP. 1981, 1994. |
| |
|___________________________________________________________________________________|
</pre>
</div>
</li>
</ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaiqbatchftpcomplx.htm">Complex example: Batch FTP</a></div>
</div>
</div>
</body>
</html>