109 lines
6.4 KiB
HTML
109 lines
6.4 KiB
HTML
<?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="reference" />
|
|
<meta name="DC.Title" content="Example: Changing a user space with an OPM RPG program" />
|
|
<meta name="abstract" content="This program changes the contents of information in the user area in the user space." />
|
|
<meta name="description" content="This program changes the contents of information in the user area in the user space." />
|
|
<meta name="DC.Relation" scheme="URI" content="listChangeUser.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="exampleopmrpg" />
|
|
<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: Changing a user space with an OPM RPG program</title>
|
|
</head>
|
|
<body id="exampleopmrpg"><a name="exampleopmrpg"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Example: Changing a user space with an OPM RPG program</h1>
|
|
<div><p>This program changes the contents of information in the user area
|
|
in the user space.</p>
|
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> Read the <a href="codedisclaimer.htm">Code license and disclaimer information</a> for important
|
|
legal information.</div>
|
|
<p>To change the user area of a user
|
|
space with a call from an OPM RPG program, specify the following:</p>
|
|
<pre> H****************************************************************
|
|
H****************************************************************
|
|
H* *
|
|
H* PROGRAM: CHANGUS *
|
|
H* *
|
|
H* LANGUAGE: RPG *
|
|
H* *
|
|
H* DESCRIPTION: THIS PROGRAM WILL CHANGE THE CONTENTS OF *
|
|
H* INFORMATION IN THE USER AREA IN THE USER SPACE*
|
|
H* (FIRST 64 BYTES). *
|
|
H* *
|
|
H* APIs USED: QUSCHGUS *
|
|
H* *
|
|
H****************************************************************
|
|
H****************************************************************
|
|
E ARY 1 1 20
|
|
E CHG 1 1 64
|
|
IUSRSPC DS
|
|
I 1 10 USNAME
|
|
I 11 20 USLIB
|
|
I DS
|
|
I B 1 40LENDTA
|
|
I B 5 80STRPOS
|
|
C* *
|
|
C****************************************************************
|
|
C****************************************************************
|
|
C* *
|
|
C* OPERABLE CODE STARTS HERE *
|
|
C* *
|
|
C****************************************************************
|
|
C****************************************************************
|
|
C* *
|
|
C* MOVE THE USER SPACE AND LIBRARY NAME FROM ARY ARRAY INTO THE *
|
|
C* USRSPC DATA STRUCTURE. ALSO, MOVE THE NEW USER DATA FROM *
|
|
C* CHG ARRAY INTO NEWVAL. *
|
|
C* *
|
|
C MOVELARY,1 USRSPC
|
|
C MOVELCHG,1 NEWVAL 64
|
|
C* *
|
|
C Z-ADD64 LENDTA LEN OF USERAREA
|
|
C Z-ADD1 STRPOS STARTING POS
|
|
C MOVE '1' FORCE 1 FORCE PARM
|
|
C* *
|
|
C* CALL THE QUSCHGUS API WHICH WILL CHANGE THE USER AREA IN THE *
|
|
C* USER SPACE. *
|
|
C* *
|
|
C CALL 'QUSCHGUS'
|
|
C PARM USRSPC
|
|
C PARM STRPOS
|
|
C PARM LENDTA
|
|
C PARM NEWVAL
|
|
C PARM FORCE
|
|
C* *
|
|
C* IF MORE OF THE USER SPACE NEEDS TO BE CHANGED, THIS PROGRAM *
|
|
C* COULD BE UPDATED TO LOOP UNTIL THE END OF THE ARRAY WAS *
|
|
C* REACHED. *
|
|
C* *
|
|
C SETON LR
|
|
C RETRN
|
|
** ARY
|
|
TEMPSPACE QGPL
|
|
** CHG
|
|
Big String padded with blanks
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="listChangeUser.htm" title="These examples illustrate how a user space can be changed.">Examples: Change a user space</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |