<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://try-as400.pocnet.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rogueai</id>
	<title>Try-AS/400 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://try-as400.pocnet.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rogueai"/>
	<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/wiki/Special:Contributions/Rogueai"/>
	<updated>2026-04-15T20:19:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Post-Install_Optimizations&amp;diff=1418</id>
		<title>Post-Install Optimizations</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Post-Install_Optimizations&amp;diff=1418"/>
		<updated>2023-09-14T11:20:38Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OS/400 provides a lot of default values for variables (affecting the run-time environment) and program options. Some of these make sense, some of them are kept consistent with earlier versions of the OS because of compatibility reasons by IBM.&lt;br /&gt;
&lt;br /&gt;
Some of these recommendations might not be appropriate for you by various reasons. Don&#039;t apply blindly. Know what you do, use the online help to retrieve background information on the topic in question.&lt;br /&gt;
&lt;br /&gt;
The findings below are based on V4R5 with annotated exceptions for newer releases.&lt;br /&gt;
&lt;br /&gt;
== Housekeeping ==&lt;br /&gt;
These are settings and scheduled jobs to keep your system uncluttered.&lt;br /&gt;
&lt;br /&gt;
=== Change unneeded programs to not run ===&lt;br /&gt;
We most likely don&#039;t need to run &#039;&#039;lpd&#039;&#039; and &#039;&#039;smtpd&#039;&#039; to run per default.&lt;br /&gt;
 CHGLPDA    AUTOSTART(*NO)&lt;br /&gt;
 CHGSMTPA   AUTOSTART(*NO)&lt;br /&gt;
&lt;br /&gt;
You can easily check all settings at once by using &amp;lt;code&amp;gt;STRDFU OPTION(5)&amp;lt;/code&amp;gt; on the file &#039;&#039;QUSRSYS/QATOCSTART&#039;&#039;. These are not needed in general. Depending on OS version, not all entries may be available.&lt;br /&gt;
* *DIRSRV&lt;br /&gt;
* *NETSVR&lt;br /&gt;
* *SLP&lt;br /&gt;
&lt;br /&gt;
=== Change uninstalled programs to not run ===&lt;br /&gt;
If you did not install the Ultimedia package, you can remove the pre started job from the QSYSWRK subsystem description to make it not generate an error message at IPL time.&lt;br /&gt;
 RMVPJE SBSD(QSYSWRK) PGM(QUMEDIA/QUMBPJTC)&lt;br /&gt;
&lt;br /&gt;
If you did not install the Directory Services package (aka LDAP), you can remove the auto started jobs from the QSYSWRK subsystem description to make them not generate an error message at IPL time.&lt;br /&gt;
 RMVAJE SBSD(QSYSWRK) JOB(QGLDPUBA)&lt;br /&gt;
 RMVAJE SBSD(QSYSWRK) JOB(QGLDPUBE)&lt;br /&gt;
&lt;br /&gt;
Both is valid and tested for V4R5.&lt;br /&gt;
&lt;br /&gt;
If you did not install the performance tools, you don&#039;t need trying to start the performance data collector:&lt;br /&gt;
 RMVAJE SBSD(QCTL) JOB(QPFRCOL)&lt;br /&gt;
&lt;br /&gt;
I can&#039;t remember if this is valid for V4R5. It&#039;s valid for V3R2, though.&lt;br /&gt;
&lt;br /&gt;
=== Cleanup unneeded stuff ===&lt;br /&gt;
These objects come by default at OS install time, are not needed to my knowledge, and thus can be safely deleted:&lt;br /&gt;
 DLTOUTQ    OUTQ(QDKT)&lt;br /&gt;
 DLTOUTQ    OUTQ(QPFROUTQ)&lt;br /&gt;
 DLTOUTQ    OUTQ(QPRINTS)&lt;br /&gt;
 DLTF       FILE(QPRINTS)&lt;br /&gt;
 DLTOUTQ    OUTQ(QPRINT2)&lt;br /&gt;
 DLTF       FILE(QPRINT2)&lt;br /&gt;
 DLTOUTQ    OUTQ(QTPPPOUTQ)&lt;br /&gt;
 DLTDEVD    DEVD(QESPAP)&lt;br /&gt;
 DLTDEVD    DEVD(QIADSP)&lt;br /&gt;
 DLTDEVD    DEVD(QIAPRT)&lt;br /&gt;
 DLTDEVD    DEVD(QQAHOST)&lt;br /&gt;
 DLTDEVD    DEVD(QTIDA)&lt;br /&gt;
 DLTDEVD    DEVD(QTIDA2)&lt;br /&gt;
 DLTCTLD    CTLD(QESCTL)&lt;br /&gt;
 DLTCTLD    CTLD(QTICTL)&lt;br /&gt;
 DLTLIND    LIND(QESLINE)&lt;br /&gt;
 DLTLIND    LIND(QTILINE)&lt;br /&gt;
&lt;br /&gt;
== System Values ==&lt;br /&gt;
System values are like environment variables as known from common operating systems. They influence system operation. I recommend the following changes.&lt;br /&gt;
&lt;br /&gt;
=== System Control ===&lt;br /&gt;
* Change work environment to separate subsystems for different kind of jobs. This also makes it easy to introduce your own subsystems.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QCTLSBSD) VALUE(&#039;QCTL QSYS&#039;)&lt;br /&gt;
* Set automatic DST adjustment, and UTC offset. This value is valid for Central Europe (Berlin, Paris, …) &#039;&#039;&#039;Note!&#039;&#039;&#039; This variable is not available in V4R5.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QTIMZON) VALUE(&#039;QP0100CET2&#039;)&lt;br /&gt;
* Adjust time to automatically end disconnected interactive jobs (sessions) to one day.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDSCJOBITV) VALUE(&#039;1440&#039;)&lt;br /&gt;
&lt;br /&gt;
=== (Memory) Allocation ===&lt;br /&gt;
* Adjust automatic performance values only at runtime, not at IPL.&amp;lt;ref&amp;gt;If you change the amount of memory for the machine, temporarily adjust the value to &#039;2&#039;, make the memory change and then change the value back to &#039;3&#039; — no further IPL needed.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPFRADJ) VALUE(&#039;3&#039;)&lt;br /&gt;
* Allow memory pools to self adjust the paging block size depending on jobs running. This is called &#039;&#039;Expert Cache&#039;&#039;. You can adjust the maximum active jobs per pool in the &amp;lt;code&amp;gt;WRKSHRPOOL&amp;lt;/code&amp;gt; display.&amp;lt;ref&amp;gt;Press &amp;lt;code&amp;gt;F21&amp;lt;/code&amp;gt; to switch to view 2 or 3 to have adjustment possibilities.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSHRPOOL POOL(*BASE) PAGING(*CALC)&lt;br /&gt;
 CHGSHRPOOL POOL(*INTERACT) PAGING(*CALC)&lt;br /&gt;
 CHGSHRPOOL POOL(*SPOOL) PAGING(*CALC)&lt;br /&gt;
* Reservations for job related data structures at IPL time. See &amp;lt;code&amp;gt;DSPSYSSTS&amp;lt;/code&amp;gt; and set to slightly more than the &#039;&#039;Jobs in System&#039;&#039; value to be seen there.&amp;lt;ref&amp;gt;Press &amp;lt;code&amp;gt;F21&amp;lt;/code&amp;gt; to switch to view 2 or 3 to see the overall job count.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QTOTJOB) VALUE(100)&lt;br /&gt;
* Reservations for job related data structures at IPL time. See &amp;lt;code&amp;gt;WRKACTJOB&amp;lt;/code&amp;gt; and set to slightly more than the &#039;&#039;Active Jobs&#039;&#039; value to be seen there.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QACTJOB) VALUE(95)&lt;br /&gt;
* Maximize TCP buffers for maximum performance, especially on faster links.&lt;br /&gt;
 CHGTCPA TCPRCVBUF(8388608) TCPSNDBUF(8388608)&lt;br /&gt;
* Make sure, database tasks can use system resources as needed.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QQRYDEGREE) VALUE(*OPTIMIZE)&lt;br /&gt;
* When interactive jobs require more CPU time than being allowed by default (2 seconds),&amp;lt;ref&amp;gt;This is set in *CLS objects.&amp;lt;/ref&amp;gt; to finish a block of processing, allow that memory to be taken from the *BASE pool. Advantage: The QINTER subsystem pool will not be subject to auto adjustment because of jobs which are supposed to run in batch.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QTSEPOOL) VALUE(*BASE)&lt;br /&gt;
&lt;br /&gt;
=== Message-and-Logging ===&lt;br /&gt;
* Allow immediate deletion of problem reports.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPRBHLDITV) VALUE(0)&lt;br /&gt;
* Do not log software errors. We can&#039;t do much about these anyway, seen from a hobbyist viewpoint.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QSFWERRLOG) VALUE(*NOLOG)&lt;br /&gt;
* Maximize Central Syslog (viewable with &amp;lt;code&amp;gt;DSPLOG&amp;lt;/code&amp;gt; size to lessen rotation frequency. Depending on OS version only &#039;&#039;VALUE(32767)&#039;&#039; may be valid.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QHSTLOGSIZ) VALUE(*DAILY)&lt;br /&gt;
* Raise allowed unsuccessful sign on tries before taking action.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QMAXSIGN) VALUE(&#039;15&#039;)&lt;br /&gt;
* Minimize logging for sessions disconnected beause of device errors.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDEVRCYACN) VALUE(*ENDJOBNOLIST)&lt;br /&gt;
&lt;br /&gt;
=== Security System Values ===&lt;br /&gt;
* Unrestrict automatic creation of system objects triggered by external (network) requests.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QAUTOVRT) VALUE(*NOMAX)&lt;br /&gt;
* Allow restore with all security relevant flags.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QALWOBJRST) VALUE(*ALL)&lt;br /&gt;
* For TCP connections to work, we need encrypted passwords.&lt;br /&gt;
 CHGDDMTCPA PWDRQD(*ENCRYPTED)&lt;br /&gt;
* Allow &#039;&#039;QSYSOPR&#039;&#039; signon to all devices.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QLMTSECOFR) VALUE(&#039;0&#039;)&lt;br /&gt;
* Raise maximum password length to maximum value.&amp;lt;ref&amp;gt;In newer OS versions, an additional variable &#039;&#039;QPWDLVL&#039;&#039; allows even longer passwords.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPWDMAXLEN) VALUE(10)&lt;br /&gt;
* Raise minimum  passsword length for security reasons.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPWDMINLEN) VALUE(8)&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
* PTF install shall be done on unattended IPL time, and don&#039;t try to report problems to IBM directly.&amp;lt;ref&amp;gt;Needs prior setup for &#039;&#039;Electronic Customer Support&#039;&#039;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSRVA PTFINSTYP(*DLYALL) RPTPRBAUTO(*NO)&lt;br /&gt;
* Provide European style formatting.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QCURSYM) VALUE(&#039;€&#039;)&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDECFMT) VALUE(&#039;J&#039;)&lt;br /&gt;
 CHGSYSVAL SYSVAL(QSRTSEQ) VALUE(*LANGIDUNQ)&amp;lt;ref&amp;gt;This value isn&#039;t available with V4R5. You can use &#039;&#039;*LANGIDSHR&#039;&#039; there.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDATFMT) VALUE(&#039;DMY&#039;)&amp;lt;ref&amp;gt;Default value for 2924 (US English) is MDY.&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Allow background compiling in PDM as ordinary user, and submitting batch jobs in general.&lt;br /&gt;
 GRTOBJAUT OBJ(QGPL/QBATCH) OBJTYPE(*JOBD) USER(*PUBLIC) AUT(*USE)&lt;br /&gt;
* Tweaking automatic cleanup (like &#039;&#039;logrotate&#039;&#039;).&lt;br /&gt;
 CHGCLNUP  ALWCLNUP(*YES) STRTIME(&#039;02:22:22&#039;) USRMSG(7) SYSMSG(3) SYSPRT(7) SYSLOG(14) CALITM(*KEEP)&lt;br /&gt;
* Change general SNA networking attributes.  This is one &#039;&#039;&#039;long&#039;&#039;&#039; line. Take care to get it completely.&lt;br /&gt;
 CHGNETA JOBACN(*SEARCH) VRTAUTODEV(254) MDMCNTRYID(DE)&lt;br /&gt;
&lt;br /&gt;
=== Charset Conversion ===&lt;br /&gt;
In addition, OS/400 has a default value of 65535 for &amp;lt;code&amp;gt;QCCSID&amp;lt;/code&amp;gt;. It should be set to a value being dependent on the installed language, to enable automatic translation of data on disk to the display device, and back. For Germany, the correct value is 273, and for US, it&#039;s 37. A good hint is to check your 5250 emulator program for possible values.&lt;br /&gt;
&lt;br /&gt;
== IPL Customization ==&lt;br /&gt;
With this procedure, the current startup program for the OS can be retrieved for easy customization.&lt;br /&gt;
 RTVCLSRC   PGM(QSTRUP) SRCFILE(QCLSRC)&lt;br /&gt;
 WRKMBRPDM  FILE(QCLSRC) MBR(QSTRUP) MBRTYPE(CLP)&lt;br /&gt;
 CRTCLPGM   PGM(QGPL/QSTRUP)&lt;br /&gt;
&lt;br /&gt;
To activate your changes, run &amp;lt;code&amp;gt;WRKSYSVAL SYSVAL(QSTRUPPGM)&amp;lt;/code&amp;gt; and change the values to reflect the new program object in QGPL. &#039;&#039;&#039;Note&#039;&#039;&#039;: On a used system&#039;s install, the previous owner might have already done a customized QSTRUP. See &amp;lt;code&amp;gt;DSPSYSVAL QSTRUPPGM&amp;lt;/code&amp;gt; which one is the currently set startup program before accidentally overwriting!&lt;br /&gt;
&lt;br /&gt;
Notable use cases for changing &amp;lt;code&amp;gt;QSTRUP&amp;lt;/code&amp;gt; would be to make SNA Distribution Services, and TCP/IP (on older releases than V4R5) start at IPL time.&lt;br /&gt;
&lt;br /&gt;
New entries must be located after the &#039;&#039;IF COND&#039;&#039; statement and &#039;&#039;DONE:&#039;&#039; label. Always put a &#039;&#039;MONMSG MSGID(CPF0000)&#039;&#039; after each statement. Failing to do so will not ignore any errors but make the IPL script terminate abnormally in case of an error and possibly leave you with an inaccessible system.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* Start TCP/IP:&lt;br /&gt;
 QSYS/STRTCP&lt;br /&gt;
 MONMSG MSGID(CPF0000)&lt;br /&gt;
&lt;br /&gt;
* Start SNADS:&lt;br /&gt;
 QSYS/STRSBS SBSD(QSNADS)&lt;br /&gt;
 MONMSG MSGID(CPF0000)&lt;br /&gt;
&lt;br /&gt;
== Change Program Defaults ==&lt;br /&gt;
This establishes different default behavior of some programs which makes life somewhat easier.&amp;lt;ref&amp;gt;Some people highly oppose against changing default values because the default values have been provided for a reason. But then, the &amp;lt;code&amp;gt;CHGCMDDFT&amp;lt;/code&amp;gt; also has been provided for a reason.&amp;lt;/ref&amp;gt; At least noting down the changed programs and their former values is recommended, for example in &amp;lt;code&amp;gt;QGPL/QTXTSRC.CMDDFT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CL applications might run a command with the changed default values, in turn combining (new) defaults and submitted parameters into an invalid combination of parameters which might lead to run-time errors.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* File creation and change defaults:&lt;br /&gt;
** Enforce immediate return to program error handling instead of make programs seem to hang (&amp;lt;code&amp;gt;wait…&amp;lt;/code&amp;gt;),&lt;br /&gt;
** Enforce reusing deleted record space,&amp;lt;ref&amp;gt;If there is no access path defined, sequentially read records are no longer guaranteed to *be in timely order (FIFO)!&amp;lt;/ref&amp;gt;&lt;br /&gt;
** Remove sizing restrictions,&amp;lt;ref&amp;gt;A runaway process filling the disks to 100&amp;amp;thinsp;% is not stopped prior!&amp;lt;/ref&amp;gt;&lt;br /&gt;
** Use a smaller access path size for probably increased performance,&lt;br /&gt;
** Allow automatic LF rebuild when running &amp;lt;code&amp;gt;chgpf&amp;lt;/code&amp;gt;.&lt;br /&gt;
 CHGCMDDFT  CMD(CRTPF) NEWDFT(&#039;SIZE(*NOMAX *N *N) WAITFILE(*IMMED) WAITRCD(*IMMED) REUSEDLT(*YES)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CRTSRCPF) NEWDFT(&#039;SIZE(*NOMAX *N *N) ACCPTHSIZ(*MAX4GB)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CHGPF) NEWDFT(&#039;DLTDEPLF(*YES) SIZE(*NOMAX *N *N) WAITFILE(*IMMED) WAITRCD(*IMMED) REUSEDLT(*YES)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CRTLF) NEWDFT(&#039;WAITFILE(*IMMED) WAITRCD(*IMMED) ACCPTHSIZ(*MAX4GB)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CHGLF) NEWDFT(&#039;WAITFILE(*IMMED) WAITRCD(*IMMED) ACCPTHSIZ(*MAX4GB)&#039;)&lt;br /&gt;
* Menus usually go into the library with the application&#039;s other objects. Change current library to there, so applications can find their objects.&amp;lt;ref&amp;gt;It might be beneficial to individually use &amp;lt;code&amp;gt;CURLIB(*NOCHG)&amp;lt;/code&amp;gt; for higher level menu objects being put into libraries which are part of the default library search list (&#039;&#039;*LIBL&#039;&#039;) — such as &#039;&#039;QGPL&#039;&#039; — to not needlessly change the default library in a for some users unexpected way.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGCMDDFT  CMD(CRTMNU) NEWDFT(&#039;CURLIB(*MNULIB)&#039;)&lt;br /&gt;
* No unnecessary wait for power down. &amp;lt;code&amp;gt;CONFIRM(*NO)&amp;lt;/code&amp;gt; can be added for newer releases to suppress prompting.&lt;br /&gt;
 CHGCMDDFT  CMD(PWRDWNSYS) NEWDFT(&#039;OPTION(*IMMED) ENDSBSOPT(*NOJOBLOG)&#039;)&lt;br /&gt;
* Don&#039;t waste time displaying a not so very much interesting screen prior to connection.&lt;br /&gt;
 CHGCMDDFT CMD(STRPASTHR) NEWDFT(&#039;PASTHRSCN(*NO)&#039;)&lt;br /&gt;
&lt;br /&gt;
Be aware that reinstalls, or applying PTFs can overwrite command objects and thus their default values.&lt;br /&gt;
&lt;br /&gt;
== Regular Cleanup jobs ==&lt;br /&gt;
See job comment TEXT for details. These are &#039;&#039;&#039;long&#039;&#039;&#039; lines. Take care to get it completely.&lt;br /&gt;
 ADDJOBSCDE JOB(PRGPRB) CMD(DLTPRB STATUS(*CLOSED)) FRQ(*WEEKLY) SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME(&#039;13:22:00&#039;) MSGQ(*LIBL/QSYSOPR) TEXT(&#039;Purge closed and deletable problem entries&#039;)&lt;br /&gt;
 ADDJOBSCDE JOB(RCLTMPSTG) CMD(RCLTMPSTG DAYS(30)) FRQ(*MONTHLY) SCDDATE(*MONTHSTR) SCDDAY(*NONE) SCDTIME(&#039;13:24:00&#039;) MSGQ(*LIBL/QSYSOPR) TEXT(&#039;Reclaim temporary storage&#039;)&lt;br /&gt;
 ADDJOBSCDE JOB(RTVDSKINF) CMD(RTVDSKINF) FRQ(*MONTHLY) SCDDATE(*MONTHSTR) SCDDAY(*NONE) SCDTIME(&#039;13:34:00&#039;) MSGQ(*LIBL/QSYSOPR) TEXT(&#039;Retrieve disk space stats&#039;)&lt;br /&gt;
 ADDJOBSCDE JOB(QPGMRCLR) CMD(CLRMSGQ MSGQ(QPGMR) CLEAR(*KEEPUNANS)) FRQ(*WEEKLY) SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME(&#039;07:07:07&#039;) RCYACN(*NOSBM) MSGQ(*NONE) TEXT(&#039;Delete uninteresting messages&#039;)&lt;br /&gt;
&lt;br /&gt;
== Re-Enable InfoSeeker ==&lt;br /&gt;
Only necessary for newer V4R4 and newer. If the command isn&#039;t known, don&#039;t bother: Then your release is so new that it&#039;s gone entirely.&lt;br /&gt;
&lt;br /&gt;
See also: [[Reviving InfoSeeker]]&lt;br /&gt;
&lt;br /&gt;
 CRTDTAARA DTAARA(QUSRSYS/QBMGINFSKR) TYPE(*CHAR) LEN(8)&amp;lt;ref&amp;gt;Works in V4R5. The &amp;lt;code&amp;gt;STRINFSKR&amp;lt;/code&amp;gt; command is not included anymore in IBM i 7.1, and probably earlier releases.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional Steps tested with V7R2 ==&lt;br /&gt;
After trying to enter SST, one gets the message that the password has expired. But the password cannot be changed. Re-IPL in manual mode, or force DST display via control panel.&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;&#039;5. Work with DST environment&#039;&#039; and &#039;&#039;3. Service tools user IDs&#039;&#039;.&lt;br /&gt;
** Disable the &amp;quot;backdoor&amp;quot; profile &#039;&#039;11111111&#039;&#039;,&lt;br /&gt;
** &#039;&#039;Change password&#039;&#039; for &#039;&#039;QSECOFR&#039;&#039;, &#039;&#039;Set password to expired&#039;&#039; to &#039;&#039;2=No&#039;&#039;.&lt;br /&gt;
* Press F12 and choose &#039;&#039;5. Work with DST environment&#039;&#039; and &#039;&#039;6. Service tools security data&#039;&#039;.&lt;br /&gt;
** Enter 0 into the field &#039;&#039;8. Password expiration interval in days&#039;&#039;, 8 into the &#039;&#039;Selection&#039;&#039; field, and press return.&lt;br /&gt;
** Enter a high number (like 12) into the field &#039;&#039;9. Maximum sign-on attempts allowed&#039;&#039;, 9 into the &#039;&#039;Selection&#039;&#039; field, and press return.&lt;br /&gt;
** Enter 0 into the field &#039;&#039;10. Duplicate password control&#039;&#039;, 10 into the &#039;&#039;Selection&#039;&#039; field, and press return.&lt;br /&gt;
&lt;br /&gt;
Now exit DST.&lt;br /&gt;
&lt;br /&gt;
You may choose to enter SST, enter 7 for &#039;&#039;Work with system security&#039;&#039;, and set &#039;&#039;Allow a service tools user ID with a default and expired password to change its own password&#039;&#039; to &#039;&#039;1=Yes&#039;&#039;. Since we changed password expiry to &#039;&#039;never&#039;&#039;, this step is entirely optional.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Change Command Defaults for File-Commands]]&lt;br /&gt;
* [[How to properly shut down your AS/400]]&lt;br /&gt;
&lt;br /&gt;
== Weblinks ==&lt;br /&gt;
* [https://archive.midrange.com/midrange-l/199912/msg01738.html STRINFSKR], Midrange Mailing-List&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: System Administration]]&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Post-Install_Optimizations&amp;diff=1364</id>
		<title>Post-Install Optimizations</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Post-Install_Optimizations&amp;diff=1364"/>
		<updated>2023-06-23T16:20:21Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OS/400 provides a lot of default values for variables (affecting the run-time environment) and program options. Some of these make sense, some of them are kept consistent with earlier versions of the OS because of compatibility reasons by IBM.&lt;br /&gt;
&lt;br /&gt;
Some of these recommendations might not be appropriate for you by various reasons. Don&#039;t apply blindly. Know what you do, use the online help to retrieve background information on the topic in question.&lt;br /&gt;
&lt;br /&gt;
The findings below are based on V4R5 with annotated exceptions for newer releases.&lt;br /&gt;
&lt;br /&gt;
== Housekeeping ==&lt;br /&gt;
These are settings and scheduled jobs to keep your system uncluttered.&lt;br /&gt;
&lt;br /&gt;
=== Change unneeded programs to not run ===&lt;br /&gt;
We most likely don&#039;t need to run &#039;&#039;lpd&#039;&#039; and &#039;&#039;smtpd&#039;&#039; to run per default.&lt;br /&gt;
 CHGLPDA    AUTOSTART(*NO)&lt;br /&gt;
 CHGSMTPA   AUTOSTART(*NO)&lt;br /&gt;
&lt;br /&gt;
You can easily check all settings at once by using &amp;lt;code&amp;gt;STRDFU OPTION(5)&amp;lt;/code&amp;gt; on the file &#039;&#039;QUSRSYS/QATOCSTART&#039;&#039;. These are not needed in general. Depending on OS version, not all entries may be available.&lt;br /&gt;
* *DIRSRV&lt;br /&gt;
* *NETSVR&lt;br /&gt;
* *SLP&lt;br /&gt;
&lt;br /&gt;
=== Change uninstalled programs to not run ===&lt;br /&gt;
If you did not install the Ultimedia package, you can remove the pre started job from the QSYSWRK subsystem description to make it not generate an error message at IPL time.&lt;br /&gt;
 RMVPJE SBSD(QSYSWRK) PGM(QUMEDIA/QUMBPJTC)&lt;br /&gt;
&lt;br /&gt;
If you did not install the Directory Services package (aka LDAP), you can remove the auto started jobs from the QSYSWRK subsystem description to make them not generate an error message at IPL time.&lt;br /&gt;
 RMVAJE SBSD(QSYSWRK) JOB(QGLDPUBA)&lt;br /&gt;
 RMVAJE SBSD(QSYSWRK) JOB(QGLDPUBE)&lt;br /&gt;
&lt;br /&gt;
Both is valid and tested for V4R5.&lt;br /&gt;
&lt;br /&gt;
=== Cleanup unneeded stuff ===&lt;br /&gt;
These objects come by default at OS install time, are not needed to my knowledge, and thus can be safely deleted:&lt;br /&gt;
 DLTOUTQ    OUTQ(QDKT)&lt;br /&gt;
 DLTOUTQ    OUTQ(QPFROUTQ)&lt;br /&gt;
 DLTOUTQ    OUTQ(QPRINTS)&lt;br /&gt;
 DLTF       FILE(QPRINTS)&lt;br /&gt;
 DLTOUTQ    OUTQ(QPRINT2)&lt;br /&gt;
 DLTF       FILE(QPRINT2)&lt;br /&gt;
 DLTOUTQ    OUTQ(QTPPPOUTQ)&lt;br /&gt;
 DLTDEVD    DEVD(QESPAP)&lt;br /&gt;
 DLTDEVD    DEVD(QIADSP)&lt;br /&gt;
 DLTDEVD    DEVD(QIAPRT)&lt;br /&gt;
 DLTDEVD    DEVD(QQAHOST)&lt;br /&gt;
 DLTDEVD    DEVD(QTIDA)&lt;br /&gt;
 DLTDEVD    DEVD(QTIDA2)&lt;br /&gt;
 DLTCTLD    CTLD(QESCTL)&lt;br /&gt;
 DLTCTLD    CTLD(QTICTL)&lt;br /&gt;
 DLTLIND    LIND(QESLINE)&lt;br /&gt;
 DLTLIND    LIND(QTILINE)&lt;br /&gt;
&lt;br /&gt;
== System Values ==&lt;br /&gt;
System values are like environment variables as known from common operating systems. They influence system operation. I recommend the following changes.&lt;br /&gt;
&lt;br /&gt;
=== System Control ===&lt;br /&gt;
* Change work environment to separate subsystems for different kind of jobs. This also makes it easy to introduce your own subsystems.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QCTLSBSD) VALUE(&#039;QCTL QSYS&#039;)&lt;br /&gt;
* Set automatic DST adjustment, and UTC offset. This value is valid for Central Europe (Berlin, Paris, …) &#039;&#039;&#039;Note!&#039;&#039;&#039; This variable is not available in V4R5.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QTIMZON) VALUE(&#039;QP0100CET2&#039;)&lt;br /&gt;
* Adjust time to automatically end disconnected interactive jobs (sessions) to one day.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDSCJOBITV) VALUE(&#039;1440&#039;)&lt;br /&gt;
&lt;br /&gt;
=== (Memory) Allocation ===&lt;br /&gt;
* Adjust automatic performance values only at runtime, not at IPL.&amp;lt;ref&amp;gt;If you change the amount of memory for the machine, temporarily adjust the value to &#039;2&#039;, make the memory change and then change the value back to &#039;3&#039; — no further IPL needed.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPFRADJ) VALUE(&#039;3&#039;)&lt;br /&gt;
* Allow memory pools to self adjust the paging block size depending on jobs running. This is called &#039;&#039;Expert Cache&#039;&#039;. You can adjust the maximum active jobs per pool in the &amp;lt;code&amp;gt;WRKSHRPOOL&amp;lt;/code&amp;gt; display.&amp;lt;ref&amp;gt;Press &amp;lt;code&amp;gt;F21&amp;lt;/code&amp;gt; to switch to view 2 or 3 to have adjustment possibilities.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSHRPOOL POOL(*BASE) PAGING(*CALC)&lt;br /&gt;
 CHGSHRPOOL POOL(*INTERACT) PAGING(*CALC)&lt;br /&gt;
 CHGSHRPOOL POOL(*SPOOL) PAGING(*CALC)&lt;br /&gt;
* Reservations for job related data structures at IPL time. See &amp;lt;code&amp;gt;DSPSYSSTS&amp;lt;/code&amp;gt; and set to slightly more than the &#039;&#039;Jobs in System&#039;&#039; value to be seen there.&amp;lt;ref&amp;gt;Press &amp;lt;code&amp;gt;F21&amp;lt;/code&amp;gt; to switch to view 2 or 3 to see the overall job count.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QTOTJOB) VALUE(100)&lt;br /&gt;
* Reservations for job related data structures at IPL time. See &amp;lt;code&amp;gt;WRKACTJOB&amp;lt;/code&amp;gt; and set to slightly more than the &#039;&#039;Active Jobs&#039;&#039; value to be seen there.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QACTJOB) VALUE(95)&lt;br /&gt;
* Maximize TCP buffers for maximum performance, especially on faster links.&lt;br /&gt;
 CHGTCPA TCPRCVBUF(8388608) TCPSNDBUF(8388608)&lt;br /&gt;
* Make sure, database tasks can use system resources as needed.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QQRYDEGREE) VALUE(*OPTIMIZE)&lt;br /&gt;
* When interactive jobs require more CPU time than being allowed by default (2 seconds),&amp;lt;ref&amp;gt;This is set in *CLS objects.&amp;lt;/ref&amp;gt; to finish a block of processing, allow that memory to be taken from the *BASE pool. Advantage: The QINTER subsystem pool will not be subject to auto adjustment because of jobs which are supposed to run in batch.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QTSEPOOL) VALUE(*BASE)&lt;br /&gt;
&lt;br /&gt;
=== Message-and-Logging ===&lt;br /&gt;
* Allow immediate deletion of problem reports.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPRBHLDITV) VALUE(0)&lt;br /&gt;
* Do not log software errors. We can&#039;t do much about these anyway, seen from a hobbyist viewpoint.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QSFWERRLOG) VALUE(*NOLOG)&lt;br /&gt;
* Maximize Central Syslog (viewable with &amp;lt;code&amp;gt;DSPLOG&amp;lt;/code&amp;gt; size to lessen rotation frequency. Depending on OS version only &#039;&#039;VALUE(32767)&#039;&#039; may be valid.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QHSTLOGSIZ) VALUE(*DAILY)&lt;br /&gt;
* Raise allowed unsuccessful sign on tries before taking action.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QMAXSIGN) VALUE(&#039;15&#039;)&lt;br /&gt;
* Minimize logging for sessions disconnected beause of device errors.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDEVRCYACN) VALUE(*ENDJOBNOLIST)&lt;br /&gt;
&lt;br /&gt;
=== Security System Values ===&lt;br /&gt;
* Unrestrict automatic creation of system objects triggered by external (network) requests.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QAUTOVRT) VALUE(*NOMAX)&lt;br /&gt;
* Allow restore with all security relevant flags.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QALWOBJRST) VALUE(*ALL)&lt;br /&gt;
* For TCP connections to work, we need encrypted passwords.&lt;br /&gt;
 CHGDDMTCPA PWDRQD(*ENCRYPTED)&lt;br /&gt;
* Allow &#039;&#039;QSYSOPR&#039;&#039; signon to all devices.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QLMTSECOFR) VALUE(&#039;0&#039;)&lt;br /&gt;
* Raise maximum password length to maximum value.&amp;lt;ref&amp;gt;In newer OS versions, an additional variable &#039;&#039;QPWDLVL&#039;&#039; allows even longer passwords.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPWDMAXLEN) VALUE(10)&lt;br /&gt;
* Raise minimum  passsword length for security reasons.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QPWDMINLEN) VALUE(8)&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
* PTF install shall be done on unattended IPL time, and don&#039;t try to report problems to IBM directly.&amp;lt;ref&amp;gt;Needs prior setup for &#039;&#039;Electronic Customer Support&#039;&#039;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGSRVA PTFINSTYP(*DLYALL) RPTPRBAUTO(*NO)&lt;br /&gt;
* Provide European style formatting.&lt;br /&gt;
 CHGSYSVAL SYSVAL(QCURSYM) VALUE(&#039;€&#039;)&lt;br /&gt;
 CHGSYSVAL SYSVAL(QDECFMT) VALUE(&#039;J&#039;)&lt;br /&gt;
 CHGSYSVAL SYSVAL(QSRTSEQ) VALUE(*LANGIDUNQ)&amp;lt;ref&amp;gt;This value isn&#039;t available with V4R5. You can use &#039;&#039;*LANGIDSHR&#039;&#039; there.&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Allow background compiling in PDM as ordinary user, and submitting batch jobs in general.&lt;br /&gt;
 GRTOBJAUT OBJ(QGPL/QBATCH) OBJTYPE(*JOBD) USER(*PUBLIC) AUT(*USE)&lt;br /&gt;
* Tweaking automatic cleanup (like &#039;&#039;logrotate&#039;&#039;).&lt;br /&gt;
 CHGCLNUP  ALWCLNUP(*YES) STRTIME(&#039;02:22:22&#039;) USRMSG(7) SYSMSG(3) SYSPRT(7) SYSLOG(14) CALITM(*KEEP)&lt;br /&gt;
* Change general SNA networking attributes.  This is one &#039;&#039;&#039;long&#039;&#039;&#039; line. Take care to get it completely.&lt;br /&gt;
 CHGNETA JOBACN(*SEARCH) VRTAUTODEV(254) MDMCNTRYID(DE)&lt;br /&gt;
&lt;br /&gt;
=== Charset Conversion ===&lt;br /&gt;
In addition, OS/400 has a default value of 65535 for &amp;lt;code&amp;gt;QCCSID&amp;lt;/code&amp;gt;. It should be set to a value being dependent on the installed language, to enable automatic translation of data on disk to the display device, and back. For Germany, the correct value is 273, and for US, it&#039;s 37. A good hint is to check your 5250 emulator program for possible values.&lt;br /&gt;
&lt;br /&gt;
== IPL Customization ==&lt;br /&gt;
With this procedure, the current startup program for the OS can be retrieved for easy customization.&lt;br /&gt;
 RTVCLSRC   PGM(QSTRUP) SRCFILE(QCLSRC)&lt;br /&gt;
 WRKMBRPDM  FILE(QCLSRC) MBR(QSTRUP) MBRTYPE(CLP)&lt;br /&gt;
 CRTCLPGM   PGM(QGPL/QSTRUP)&lt;br /&gt;
&lt;br /&gt;
To activate your changes, run &amp;lt;code&amp;gt;WRKSYSVAL SYSVAL(QSTRUPPGM)&amp;lt;/code&amp;gt; and change the values to reflect the new program object in QGPL. &#039;&#039;&#039;Note&#039;&#039;&#039;: On a used system&#039;s install, the previous owner might have already done a customized QSTRUP. See &amp;lt;code&amp;gt;DSPSYSVAL QSTRUPPGM&amp;lt;/code&amp;gt; which one is the currently set startup program before accidentally overwriting!&lt;br /&gt;
&lt;br /&gt;
Notable use cases for changing &amp;lt;code&amp;gt;QSTRUP&amp;lt;/code&amp;gt; would be to make SNA Distribution Services, and TCP/IP (on older releases than V4R5) start at IPL time.&lt;br /&gt;
&lt;br /&gt;
New entries must be located after the &#039;&#039;IF COND&#039;&#039; statement and &#039;&#039;DONE:&#039;&#039; label. Always put a &#039;&#039;MONMSG MSGID(CPF0000)&#039;&#039; after each statement. Failing to do so will not ignore any errors but make the IPL script terminate abnormally in case of an error and possibly leave you with an inaccessible system.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* Start TCP/IP:&lt;br /&gt;
 QSYS/STRTCP&lt;br /&gt;
 MONMSG MSGID(CPF0000)&lt;br /&gt;
&lt;br /&gt;
* Start SNADS:&lt;br /&gt;
 QSYS/STRSBS SBSD(QSNADS)&lt;br /&gt;
 MONMSG MSGID(CPF0000)&lt;br /&gt;
&lt;br /&gt;
== Change Program Defaults ==&lt;br /&gt;
This establishes different default behavior of some programs which makes life somewhat easier.&amp;lt;ref&amp;gt;Some people highly oppose against changing default values because the default values have been provided for a reason. But then, the &amp;lt;code&amp;gt;CHGCMDDFT&amp;lt;/code&amp;gt; also has been provided for a reason.&amp;lt;/ref&amp;gt; Noting down the changed programs and their former values is recommended, for example in &amp;lt;code&amp;gt;QGPL/QTXTSRC.CMDDFT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* File creation and change defaults: Enforce immediate return to program error handling instead of make programs seem to hang.&lt;br /&gt;
 CHGCMDDFT  CMD(CRTPF) NEWDFT(&#039;SIZE(*NOMAX *N *N) WAITFILE(*IMMED) WAITRCD(*IMMED) REUSEDLT(*YES)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CHGPF) NEWDFT(&#039;DLTDEPLF(*YES) SIZE(*NOMAX *N *N) WAITFILE(*IMMED) WAITRCD(*IMMED) REUSEDLT(*YES)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CRTLF) NEWDFT(&#039;WAITFILE(*IMMED) WAITRCD(*IMMED)&#039;)&lt;br /&gt;
 CHGCMDDFT  CMD(CHGLF) NEWDFT(&#039;WAITFILE(*IMMED) WAITRCD(*IMMED)&#039;)&lt;br /&gt;
* Menus usually go into the library with the application&#039;s other objects. Change current library to there, so applications can find their objects.&amp;lt;ref&amp;gt;It might be beneficial to individually use &amp;lt;code&amp;gt;CURLIB(*NOCHG)&amp;lt;/code&amp;gt; for higher level menu objects being put into libraries which are part of the default library search list (&#039;&#039;*LIBL&#039;&#039;) — such as &#039;&#039;QGPL&#039;&#039; — to not needlessly change the default library in a for some users unexpected way.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 CHGCMDDFT  CMD(CRTMNU) NEWDFT(&#039;CURLIB(*MNULIB)&#039;)&lt;br /&gt;
* No unnecessary wait for power down. &amp;lt;code&amp;gt;CONFIRM(*NO)&amp;lt;/code&amp;gt; can be added for newer releases to suppress prompting.&lt;br /&gt;
 CHGCMDDFT  CMD(PWRDWNSYS) NEWDFT(&#039;OPTION(*IMMED) ENDSBSOPT(*NOJOBLOG)&#039;)&lt;br /&gt;
* Don&#039;t waste time displaying a not so very much interesting screen prior to connection.&lt;br /&gt;
 CHGCMDDFT CMD(STRPASTHR) NEWDFT(&#039;PASTHRSCN(*NO)&#039;)&lt;br /&gt;
&lt;br /&gt;
== Regular Cleanup jobs ==&lt;br /&gt;
See job comment TEXT for details. These are &#039;&#039;&#039;long&#039;&#039;&#039; lines. Take care to get it completely.&lt;br /&gt;
 ADDJOBSCDE JOB(PRGPRB) CMD(DLTPRB STATUS(*CLOSED)) FRQ(*WEEKLY) SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME(&#039;13:22:00&#039;) MSGQ(*LIBL/QSYSOPR) TEXT(&#039;Purge closed and deletable problem entries&#039;)&lt;br /&gt;
 ADDJOBSCDE JOB(RCLTMPSTG) CMD(RCLTMPSTG DAYS(30)) FRQ(*MONTHLY) SCDDATE(*MONTHSTR) SCDDAY(*NONE) SCDTIME(&#039;13:24:00&#039;) MSGQ(*LIBL/QSYSOPR) TEXT(&#039;Reclaim temporary storage&#039;)&lt;br /&gt;
 ADDJOBSCDE JOB(RTVDSKINF) CMD(RTVDSKINF) FRQ(*MONTHLY) SCDDATE(*MONTHSTR) SCDDAY(*NONE) SCDTIME(&#039;13:34:00&#039;) MSGQ(*LIBL/QSYSOPR) TEXT(&#039;Retrieve disk space stats&#039;)&lt;br /&gt;
 ADDJOBSCDE JOB(QPGMRCLR) CMD(CLRMSGQ MSGQ(QPGMR) CLEAR(*KEEPUNANS)) FRQ(*WEEKLY) SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME(&#039;07:07:07&#039;) RCYACN(*NOSBM) MSGQ(*NONE) TEXT(&#039;Delete uninteresting messages&#039;)&lt;br /&gt;
&lt;br /&gt;
== Re-Enable InfoSeeker ==&lt;br /&gt;
See also: [[Reviving InfoSeeker]]&lt;br /&gt;
&lt;br /&gt;
 CRTDTAARA DTAARA(QUSRSYS/QBMGINFSKR) TYPE(*CHAR) LEN(8)&amp;lt;ref&amp;gt;Works in V4R5. The &amp;lt;code&amp;gt;STRINFSKR&amp;lt;/code&amp;gt; command is not included anymore in IBM i 7.1, and probably earlier releases.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional Steps for at least V7R2 and probably newer ==&lt;br /&gt;
After trying to enter SST, one gets the message that the password has expired. But the password cannot be changed. Re-IPL in manual mode, or force DST display via control panel.&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;&#039;5. Work with DST environment&#039;&#039; and &#039;&#039;3. Service tools user IDs&#039;&#039;.&lt;br /&gt;
** Disable the &amp;quot;backdoor&amp;quot; profile &#039;&#039;11111111&#039;&#039;,&lt;br /&gt;
** &#039;&#039;Change password&#039;&#039; for &#039;&#039;QSECOFR&#039;&#039;, &#039;&#039;Set password to expired&#039;&#039; to &#039;&#039;2=No&#039;&#039;.&lt;br /&gt;
* Press F12 and choose &#039;&#039;5. Work with DST environment&#039;&#039; and &#039;&#039;6. Service tools security data&#039;&#039;.&lt;br /&gt;
** Enter 0 into the field &#039;&#039;8. Password expiration interval in days&#039;&#039;, 8 into the &#039;&#039;Selection&#039;&#039; field, and press return.&lt;br /&gt;
** Enter a high number (like 12) into the field &#039;&#039;9. Maximum sign-on attempts allowed&#039;&#039;, 9 into the &#039;&#039;Selection&#039;&#039; field, and press return.&lt;br /&gt;
** Enter 0 into the field &#039;&#039;10. Duplicate password control&#039;&#039;, 10 into the &#039;&#039;Selection&#039;&#039; field, and press return.&lt;br /&gt;
&lt;br /&gt;
Now exit DST.&lt;br /&gt;
&lt;br /&gt;
You may choose to enter SST, enter 7 for &#039;&#039;Work with system security&#039;&#039;, and set &#039;&#039;Allow a service tools user ID with a default and expired password to change its own password&#039;&#039; to &#039;&#039;1=Yes&#039;&#039;. Since we changed password expiry to &#039;&#039;never&#039;&#039;, this step is entirely optional.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Change Command Defaults for File-Commands]]&lt;br /&gt;
* [[How to properly shut down your AS/400]]&lt;br /&gt;
&lt;br /&gt;
== Weblinks ==&lt;br /&gt;
* [https://archive.midrange.com/midrange-l/199912/msg01738.html STRINFSKR], Midrange Mailing-List&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: System Administration]]&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1362</id>
		<title>User:Rogueai</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1362"/>
		<updated>2023-06-23T07:47:31Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: /* Cannot perform CHGNETA due to active APPC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page currently serves as my &amp;quot;braindump&amp;quot; to keep track of various findings while I explore the AS/400 world. &lt;br /&gt;
&lt;br /&gt;
All the information available here is tested on the machine available to me: AS/400 9406-170 V4R2&lt;br /&gt;
&lt;br /&gt;
== Screenshot script for tn5250j ==&lt;br /&gt;
While researching and trying out new things, I often find myself taking screenshots or saving the screen content as text.&lt;br /&gt;
To ease this process I wrote a simple jython script that can be used with tn5250j.&lt;br /&gt;
&lt;br /&gt;
The script saves the current screen as both a txt and a png file.&lt;br /&gt;
&lt;br /&gt;
The script must be placed inside &amp;lt;code&amp;gt;$HOME/.tn5250j/scripts&amp;lt;/code&amp;gt; as a python source file, e.g.: &amp;lt;code&amp;gt;myScript.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
It can then be referenced from the &amp;quot;Macros&amp;quot; menu. A keybind can also be assigned to further ease the process.&lt;br /&gt;
&lt;br /&gt;
Currently, output files are stored in &amp;lt;code&amp;gt;$HOME/Documents/as400/screens&amp;lt;/code&amp;gt;, with the file names being in the format &amp;lt;code&amp;gt;screen-&amp;lt;yyyyMMdd-HHmmss&amp;gt;.[txt|png]&amp;lt;/code&amp;gt;.&lt;br /&gt;
I&#039;d suggest reviewing the script and customizing it to your liking before running it for the first time.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from org.tn5250j.tools.encoder import EncodeComponent&lt;br /&gt;
&lt;br /&gt;
from java.text import SimpleDateFormat&lt;br /&gt;
from java.util import Date&lt;br /&gt;
from java.lang import String&lt;br /&gt;
from java.lang import StringBuffer&lt;br /&gt;
from java.lang import System&lt;br /&gt;
from java.io import File&lt;br /&gt;
&lt;br /&gt;
def fillBuffer(screen, sb):&lt;br /&gt;
    chars = screen.getScreenAsChars()&lt;br /&gt;
    c = screen.getColumns()&lt;br /&gt;
    l = screen.getRows() * c&lt;br /&gt;
&lt;br /&gt;
    x = 0&lt;br /&gt;
    y = 0&lt;br /&gt;
    while x &amp;lt; l:&lt;br /&gt;
        sb.append(chars[x])&lt;br /&gt;
        if y == c - 1:&lt;br /&gt;
            sb.append(&#039;\n&#039;)&lt;br /&gt;
            y = 0&lt;br /&gt;
        else :&lt;br /&gt;
            y += 1&lt;br /&gt;
        x += 1&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------------- tn5250j printScreen script start ------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
home = System.getProperty(&amp;quot;user.home&amp;quot;)&lt;br /&gt;
filename = &#039;screen-&#039; + SimpleDateFormat(&amp;quot;yyyyMMdd-HHmmss&amp;quot;).format(Date())&lt;br /&gt;
filepath = home + &#039;/Documents/as400/screens/&#039; + filename&lt;br /&gt;
&lt;br /&gt;
screen = _session.getScreen()&lt;br /&gt;
sb = StringBuffer()&lt;br /&gt;
&lt;br /&gt;
fillBuffer(screen, sb)&lt;br /&gt;
&lt;br /&gt;
screen_txt = open(filepath + &#039;.txt&#039;,&#039;w&#039;)&lt;br /&gt;
screen_txt.write(sb.toString())&lt;br /&gt;
screen_txt.close()&lt;br /&gt;
&lt;br /&gt;
screen_png = open(filepath + &#039;.png&#039;,&#039;w&#039;)&lt;br /&gt;
EncodeComponent.encode(EncodeComponent.PNG, _session, screen_png)&lt;br /&gt;
screen_png.close()&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;---------------- tn5250j printScreen script end -------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JTOpen/jt400 ==&lt;br /&gt;
&lt;br /&gt;
This is a short list of notes about IBM&#039; open source project [https://github.com/IBM/JTOpen JTOpen] aka jt400.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
JTOpen is the open source software product known as the &amp;quot;IBM Toolbox for Java.&amp;quot; It is also commonly referred to &amp;quot;jt400&amp;quot; or simply &amp;quot;the toolbox.&amp;quot; &lt;br /&gt;
In short, this package provides a set of Java classes that enable applications to integrate with IBM i&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project&#039;s readme reports compatibility between different version of OS/400 as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Toolbox                         Installs on     Connects to&lt;br /&gt;
release         LPP release     OS/400 version  OS/400 version&lt;br /&gt;
-------         --------------  --------------  --------------&lt;br /&gt;
V4R2            5763JC1 V3R2M0  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R3            5763JC1 V3R2M1  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R4            5769JC1 V4R2M0  V4R2 and up     V4R2 and up&lt;br /&gt;
V4R5            5769JC1 V4R5M0  V4R3 and up     V4R2 and up&lt;br /&gt;
V5R1            5722JC1 V5R1M0  V4R4 and up     V4R3 and up&lt;br /&gt;
V5R2            5722JC1 V5R2M0  V4R5 and up     V4R5 and up&lt;br /&gt;
V5R3(*)         5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
V5R4(**)        5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 1.x      Not applicable  Not applicable  V4R3 and up&lt;br /&gt;
JTOpen 2.x      Not applicable  Not applicable  V4R4 and up&lt;br /&gt;
JTOpen 3.x      Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.0-4.2  Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.3-4.7  5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
JTOpen 4.8+     5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 6.1+     5761JC1 V6R1M0  V5R3 and up     V5R3 and up&lt;br /&gt;
JTOpen 7.0+     5770SS1 V7R1M0  V5R4 and up     V5R4 and up&lt;br /&gt;
&lt;br /&gt;
(*)  Note: Toolbox release V5R3 is equivalent to JTOpen 4.3.&lt;br /&gt;
(**) Note: Toolbox release V5R4 is equivalent to JTOpen 4.8.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project was originally named &amp;quot;Java Toolbox&amp;quot;, and later open sourced and rebranded as JTOpen 1.x.&lt;br /&gt;
The readme seems to imply that JTOpen (the open source version) has never been compatible with V4R2, however tn5250j is currently using JTOpen 10.5 and it seems to be working.&lt;br /&gt;
&lt;br /&gt;
The reason could be that jt400 is actually a collection of modules, and tn5250j might be using only part of them. As a counter example, the latest ACS uses JTOpen 11.5 and doesn&#039;t work on V4R2, attempting to connect would fail. Tests on that side have pointed out to a possible change in the way JDBC connections are established.&lt;br /&gt;
&lt;br /&gt;
The latest known version of JTOpen that&#039;s able to establish a JDBC connection is 5.3, as verified by running this simple JUnit test:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class JDBCTest {&lt;br /&gt;
&lt;br /&gt;
    @Test&lt;br /&gt;
    public void test() throws SQLException {&lt;br /&gt;
        AS400JDBCDriver driver = new AS400JDBCDriver();&lt;br /&gt;
        DriverManager.registerDriver(driver);&lt;br /&gt;
        Connection connection = DriverManager.getConnection(&amp;quot;jdbc:as400://hostname&amp;quot;, &amp;quot;user&amp;quot;, &amp;quot;pass&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Running this test using JTOpen 5.4 against V4R2 will result in a &amp;quot;General security error&amp;quot;, which is the same error you&#039;d get when trying to start a 5250 session on ACS.&lt;br /&gt;
&lt;br /&gt;
Specifically, the AS/400 returns a: &amp;lt;code&amp;gt;SQL state 08004: The application server rejected establishment of the connection.&amp;lt;/code&amp;gt;[https://www.ibm.com/docs/en/db2/9.7?topic=messages-sqlstate]&lt;br /&gt;
&lt;br /&gt;
== Cannot perform CHGNETA due to active APPC ==&lt;br /&gt;
&lt;br /&gt;
I got this error when trying to change my system&#039;s name from CHGNETA.&lt;br /&gt;
&lt;br /&gt;
According to: [https://www.ibm.com/support/pages/qilanm3601-controller-description QILANM3601 Controller Description] (archive: [https://web.archive.org/web/20230623060930/https://www.ibm.com/support/pages/qilanm3601-controller-description])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
QILANM3601 controller description can cause some problems with the system. QILANM3601 is no longer supported and should be deleted.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For my use case I decided to just disable it for the time being:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;WRKCTLD&amp;lt;/code&amp;gt;&lt;br /&gt;
* Locate &amp;lt;code&amp;gt;QILANM3601  *APPC&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1361</id>
		<title>User:Rogueai</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1361"/>
		<updated>2023-06-23T06:34:38Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page currently serves as my &amp;quot;braindump&amp;quot; to keep track of various findings while I explore the AS/400 world. &lt;br /&gt;
&lt;br /&gt;
All the information available here is tested on the machine available to me: AS/400 9406-170 V4R2&lt;br /&gt;
&lt;br /&gt;
== Screenshot script for tn5250j ==&lt;br /&gt;
While researching and trying out new things, I often find myself taking screenshots or saving the screen content as text.&lt;br /&gt;
To ease this process I wrote a simple jython script that can be used with tn5250j.&lt;br /&gt;
&lt;br /&gt;
The script saves the current screen as both a txt and a png file.&lt;br /&gt;
&lt;br /&gt;
The script must be placed inside &amp;lt;code&amp;gt;$HOME/.tn5250j/scripts&amp;lt;/code&amp;gt; as a python source file, e.g.: &amp;lt;code&amp;gt;myScript.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
It can then be referenced from the &amp;quot;Macros&amp;quot; menu. A keybind can also be assigned to further ease the process.&lt;br /&gt;
&lt;br /&gt;
Currently, output files are stored in &amp;lt;code&amp;gt;$HOME/Documents/as400/screens&amp;lt;/code&amp;gt;, with the file names being in the format &amp;lt;code&amp;gt;screen-&amp;lt;yyyyMMdd-HHmmss&amp;gt;.[txt|png]&amp;lt;/code&amp;gt;.&lt;br /&gt;
I&#039;d suggest reviewing the script and customizing it to your liking before running it for the first time.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from org.tn5250j.tools.encoder import EncodeComponent&lt;br /&gt;
&lt;br /&gt;
from java.text import SimpleDateFormat&lt;br /&gt;
from java.util import Date&lt;br /&gt;
from java.lang import String&lt;br /&gt;
from java.lang import StringBuffer&lt;br /&gt;
from java.lang import System&lt;br /&gt;
from java.io import File&lt;br /&gt;
&lt;br /&gt;
def fillBuffer(screen, sb):&lt;br /&gt;
    chars = screen.getScreenAsChars()&lt;br /&gt;
    c = screen.getColumns()&lt;br /&gt;
    l = screen.getRows() * c&lt;br /&gt;
&lt;br /&gt;
    x = 0&lt;br /&gt;
    y = 0&lt;br /&gt;
    while x &amp;lt; l:&lt;br /&gt;
        sb.append(chars[x])&lt;br /&gt;
        if y == c - 1:&lt;br /&gt;
            sb.append(&#039;\n&#039;)&lt;br /&gt;
            y = 0&lt;br /&gt;
        else :&lt;br /&gt;
            y += 1&lt;br /&gt;
        x += 1&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------------- tn5250j printScreen script start ------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
home = System.getProperty(&amp;quot;user.home&amp;quot;)&lt;br /&gt;
filename = &#039;screen-&#039; + SimpleDateFormat(&amp;quot;yyyyMMdd-HHmmss&amp;quot;).format(Date())&lt;br /&gt;
filepath = home + &#039;/Documents/as400/screens/&#039; + filename&lt;br /&gt;
&lt;br /&gt;
screen = _session.getScreen()&lt;br /&gt;
sb = StringBuffer()&lt;br /&gt;
&lt;br /&gt;
fillBuffer(screen, sb)&lt;br /&gt;
&lt;br /&gt;
screen_txt = open(filepath + &#039;.txt&#039;,&#039;w&#039;)&lt;br /&gt;
screen_txt.write(sb.toString())&lt;br /&gt;
screen_txt.close()&lt;br /&gt;
&lt;br /&gt;
screen_png = open(filepath + &#039;.png&#039;,&#039;w&#039;)&lt;br /&gt;
EncodeComponent.encode(EncodeComponent.PNG, _session, screen_png)&lt;br /&gt;
screen_png.close()&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;---------------- tn5250j printScreen script end -------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JTOpen/jt400 ==&lt;br /&gt;
&lt;br /&gt;
This is a short list of notes about IBM&#039; open source project [https://github.com/IBM/JTOpen JTOpen] aka jt400.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
JTOpen is the open source software product known as the &amp;quot;IBM Toolbox for Java.&amp;quot; It is also commonly referred to &amp;quot;jt400&amp;quot; or simply &amp;quot;the toolbox.&amp;quot; &lt;br /&gt;
In short, this package provides a set of Java classes that enable applications to integrate with IBM i&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project&#039;s readme reports compatibility between different version of OS/400 as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Toolbox                         Installs on     Connects to&lt;br /&gt;
release         LPP release     OS/400 version  OS/400 version&lt;br /&gt;
-------         --------------  --------------  --------------&lt;br /&gt;
V4R2            5763JC1 V3R2M0  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R3            5763JC1 V3R2M1  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R4            5769JC1 V4R2M0  V4R2 and up     V4R2 and up&lt;br /&gt;
V4R5            5769JC1 V4R5M0  V4R3 and up     V4R2 and up&lt;br /&gt;
V5R1            5722JC1 V5R1M0  V4R4 and up     V4R3 and up&lt;br /&gt;
V5R2            5722JC1 V5R2M0  V4R5 and up     V4R5 and up&lt;br /&gt;
V5R3(*)         5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
V5R4(**)        5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 1.x      Not applicable  Not applicable  V4R3 and up&lt;br /&gt;
JTOpen 2.x      Not applicable  Not applicable  V4R4 and up&lt;br /&gt;
JTOpen 3.x      Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.0-4.2  Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.3-4.7  5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
JTOpen 4.8+     5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 6.1+     5761JC1 V6R1M0  V5R3 and up     V5R3 and up&lt;br /&gt;
JTOpen 7.0+     5770SS1 V7R1M0  V5R4 and up     V5R4 and up&lt;br /&gt;
&lt;br /&gt;
(*)  Note: Toolbox release V5R3 is equivalent to JTOpen 4.3.&lt;br /&gt;
(**) Note: Toolbox release V5R4 is equivalent to JTOpen 4.8.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project was originally named &amp;quot;Java Toolbox&amp;quot;, and later open sourced and rebranded as JTOpen 1.x.&lt;br /&gt;
The readme seems to imply that JTOpen (the open source version) has never been compatible with V4R2, however tn5250j is currently using JTOpen 10.5 and it seems to be working.&lt;br /&gt;
&lt;br /&gt;
The reason could be that jt400 is actually a collection of modules, and tn5250j might be using only part of them. As a counter example, the latest ACS uses JTOpen 11.5 and doesn&#039;t work on V4R2, attempting to connect would fail. Tests on that side have pointed out to a possible change in the way JDBC connections are established.&lt;br /&gt;
&lt;br /&gt;
The latest known version of JTOpen that&#039;s able to establish a JDBC connection is 5.3, as verified by running this simple JUnit test:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class JDBCTest {&lt;br /&gt;
&lt;br /&gt;
    @Test&lt;br /&gt;
    public void test() throws SQLException {&lt;br /&gt;
        AS400JDBCDriver driver = new AS400JDBCDriver();&lt;br /&gt;
        DriverManager.registerDriver(driver);&lt;br /&gt;
        Connection connection = DriverManager.getConnection(&amp;quot;jdbc:as400://hostname&amp;quot;, &amp;quot;user&amp;quot;, &amp;quot;pass&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Running this test using JTOpen 5.4 against V4R2 will result in a &amp;quot;General security error&amp;quot;, which is the same error you&#039;d get when trying to start a 5250 session on ACS.&lt;br /&gt;
&lt;br /&gt;
Specifically, the AS/400 returns a: &amp;lt;code&amp;gt;SQL state 08004: The application server rejected establishment of the connection.&amp;lt;/code&amp;gt;[https://www.ibm.com/docs/en/db2/9.7?topic=messages-sqlstate]&lt;br /&gt;
&lt;br /&gt;
== Cannot perform CHGNETA due to active APPC ==&lt;br /&gt;
&lt;br /&gt;
I got this error when trying to change my system&#039;s name from CHGNETA.&lt;br /&gt;
&lt;br /&gt;
According to: [https://www.ibm.com/support/pages/qilanm3601-controller-description QILANM3601 Controller Description] (archive: [https://web.archive.org/web/20230623060930/https://www.ibm.com/support/pages/qilanm3601-controller-description])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
QILANM3601 controller description can cause some problems with the system. QILANM3601 is no longer supported and should be deleted.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For my use case I decided to just disable it for the time being:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;WRKCTLD&amp;lt;/code&amp;gt;&lt;br /&gt;
* Locale &amp;lt;code&amp;gt;QILANM3601  *APPC&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1356</id>
		<title>User:Rogueai</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1356"/>
		<updated>2023-06-04T12:15:45Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: Fixed tn5250j script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page currently serves as my &amp;quot;braindump&amp;quot; to keep track of various findings while I explore the AS/400 world. &lt;br /&gt;
&lt;br /&gt;
All the information available here is tested on the machine available to me: AS/400 9406-170 V4R2&lt;br /&gt;
&lt;br /&gt;
== Screenshot script for tn5250j ==&lt;br /&gt;
While researching and trying out new things, I often find myself taking screenshots or saving the screen content as text.&lt;br /&gt;
To ease this process I wrote a simple jython script that can be used with tn5250j.&lt;br /&gt;
&lt;br /&gt;
The script saves the current screen as both a txt and a png file.&lt;br /&gt;
&lt;br /&gt;
The script must be placed inside &amp;lt;code&amp;gt;$HOME/.tn5250j/scripts&amp;lt;/code&amp;gt; as a python source file, e.g.: &amp;lt;code&amp;gt;myScript.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
It can then be referenced from the &amp;quot;Macros&amp;quot; menu. A keybind can also be assigned to further ease the process.&lt;br /&gt;
&lt;br /&gt;
Currently, output files are stored in &amp;lt;code&amp;gt;$HOME/Documents/as400/screens&amp;lt;/code&amp;gt;, with the file names being in the format &amp;lt;code&amp;gt;screen-&amp;lt;yyyyMMdd-HHmmss&amp;gt;.[txt|png]&amp;lt;/code&amp;gt;.&lt;br /&gt;
I&#039;d suggest reviewing the script and customizing it to your liking before running it for the first time.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from org.tn5250j.tools.encoder import EncodeComponent&lt;br /&gt;
&lt;br /&gt;
from java.text import SimpleDateFormat&lt;br /&gt;
from java.util import Date&lt;br /&gt;
from java.lang import String&lt;br /&gt;
from java.lang import StringBuffer&lt;br /&gt;
from java.lang import System&lt;br /&gt;
from java.io import File&lt;br /&gt;
&lt;br /&gt;
def fillBuffer(screen, sb):&lt;br /&gt;
    chars = screen.getScreenAsChars()&lt;br /&gt;
    c = screen.getColumns()&lt;br /&gt;
    l = screen.getRows() * c&lt;br /&gt;
&lt;br /&gt;
    x = 0&lt;br /&gt;
    y = 0&lt;br /&gt;
    while x &amp;lt; l:&lt;br /&gt;
        sb.append(chars[x])&lt;br /&gt;
        if y == c - 1:&lt;br /&gt;
            sb.append(&#039;\n&#039;)&lt;br /&gt;
            y = 0&lt;br /&gt;
        else :&lt;br /&gt;
            y += 1&lt;br /&gt;
        x += 1&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------------- tn5250j printScreen script start ------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
home = System.getProperty(&amp;quot;user.home&amp;quot;)&lt;br /&gt;
filename = &#039;screen-&#039; + SimpleDateFormat(&amp;quot;yyyyMMdd-HHmmss&amp;quot;).format(Date())&lt;br /&gt;
filepath = home + &#039;/Documents/as400/screens/&#039; + filename&lt;br /&gt;
&lt;br /&gt;
screen = _session.getScreen()&lt;br /&gt;
sb = StringBuffer()&lt;br /&gt;
&lt;br /&gt;
fillBuffer(screen, sb)&lt;br /&gt;
&lt;br /&gt;
screen_txt = open(filepath + &#039;.txt&#039;,&#039;w&#039;)&lt;br /&gt;
screen_txt.write(sb.toString())&lt;br /&gt;
screen_txt.close()&lt;br /&gt;
&lt;br /&gt;
screen_png = open(filepath + &#039;.png&#039;,&#039;w&#039;)&lt;br /&gt;
EncodeComponent.encode(EncodeComponent.PNG, _session, screen_png)&lt;br /&gt;
screen_png.close()&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;---------------- tn5250j printScreen script end -------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JTOpen/jt400 ==&lt;br /&gt;
&lt;br /&gt;
This is a short list of notes about IBM&#039; open source project [https://github.com/IBM/JTOpen JTOpen] aka jt400.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
JTOpen is the open source software product known as the &amp;quot;IBM Toolbox for Java.&amp;quot; It is also commonly referred to &amp;quot;jt400&amp;quot; or simply &amp;quot;the toolbox.&amp;quot; &lt;br /&gt;
In short, this package provides a set of Java classes that enable applications to integrate with IBM i&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project&#039;s readme reports compatibility between different version of OS/400 as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Toolbox                         Installs on     Connects to&lt;br /&gt;
release         LPP release     OS/400 version  OS/400 version&lt;br /&gt;
-------         --------------  --------------  --------------&lt;br /&gt;
V4R2            5763JC1 V3R2M0  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R3            5763JC1 V3R2M1  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R4            5769JC1 V4R2M0  V4R2 and up     V4R2 and up&lt;br /&gt;
V4R5            5769JC1 V4R5M0  V4R3 and up     V4R2 and up&lt;br /&gt;
V5R1            5722JC1 V5R1M0  V4R4 and up     V4R3 and up&lt;br /&gt;
V5R2            5722JC1 V5R2M0  V4R5 and up     V4R5 and up&lt;br /&gt;
V5R3(*)         5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
V5R4(**)        5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 1.x      Not applicable  Not applicable  V4R3 and up&lt;br /&gt;
JTOpen 2.x      Not applicable  Not applicable  V4R4 and up&lt;br /&gt;
JTOpen 3.x      Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.0-4.2  Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.3-4.7  5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
JTOpen 4.8+     5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 6.1+     5761JC1 V6R1M0  V5R3 and up     V5R3 and up&lt;br /&gt;
JTOpen 7.0+     5770SS1 V7R1M0  V5R4 and up     V5R4 and up&lt;br /&gt;
&lt;br /&gt;
(*)  Note: Toolbox release V5R3 is equivalent to JTOpen 4.3.&lt;br /&gt;
(**) Note: Toolbox release V5R4 is equivalent to JTOpen 4.8.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project was originally named &amp;quot;Java Toolbox&amp;quot;, and later open sourced and rebranded as JTOpen 1.x.&lt;br /&gt;
The readme seems to imply that JTOpen (the open source version) has never been compatible with V4R2, however tn5250j is currently using JTOpen 10.5 and it seems to be working.&lt;br /&gt;
&lt;br /&gt;
The reason could be that jt400 is actually a collection of modules, and tn5250j might be using only part of them. As a counter example, the latest ACS uses JTOpen 11.5 and doesn&#039;t work on V4R2, attempting to connect would fail. Tests on that side have pointed out to a possible change in the way JDBC connections are established.&lt;br /&gt;
&lt;br /&gt;
The latest known version of JTOpen that&#039;s able to establish a JDBC connection is 5.3, as verified by running this simple JUnit test:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class JDBCTest {&lt;br /&gt;
&lt;br /&gt;
    @Test&lt;br /&gt;
    public void test() throws SQLException {&lt;br /&gt;
        AS400JDBCDriver driver = new AS400JDBCDriver();&lt;br /&gt;
        DriverManager.registerDriver(driver);&lt;br /&gt;
        Connection connection = DriverManager.getConnection(&amp;quot;jdbc:as400://hostname&amp;quot;, &amp;quot;user&amp;quot;, &amp;quot;pass&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Running this test using JTOpen 5.4 against V4R2 will result in a &amp;quot;General security error&amp;quot;, which is the same error you&#039;d get when trying to start a 5250 session on ACS.&lt;br /&gt;
&lt;br /&gt;
Specifically, the AS/400 returns a: &amp;lt;code&amp;gt;SQL state 08004: The application server rejected establishment of the connection.&amp;lt;/code&amp;gt;[https://www.ibm.com/docs/en/db2/9.7?topic=messages-sqlstate]&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1355</id>
		<title>User:Rogueai</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1355"/>
		<updated>2023-06-03T16:45:26Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page currently serves as my &amp;quot;braindump&amp;quot; to keep track of various findings while I explore the AS/400 world. &lt;br /&gt;
&lt;br /&gt;
All the information available here is tested on the machine available to me: AS/400 9406-170 V4R2&lt;br /&gt;
&lt;br /&gt;
== Screenshot script for tn5250j ==&lt;br /&gt;
While researching and trying out new things, I often find myself taking screenshots or saving the screen content as text.&lt;br /&gt;
To ease this process I wrote a simple jython script that can be used with tn5250j.&lt;br /&gt;
&lt;br /&gt;
The script saves the current screen as both a txt and a png file.&lt;br /&gt;
&lt;br /&gt;
The script must be placed inside &amp;lt;code&amp;gt;$HOME/.tn5250j/scripts&amp;lt;/code&amp;gt; as a python source file, e.g.: &amp;lt;code&amp;gt;myScript.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
It can then be referenced from the &amp;quot;Macros&amp;quot; menu. A keybind can also be assigned to further ease the process.&lt;br /&gt;
&lt;br /&gt;
Currently, output files are stored in &amp;lt;code&amp;gt;$HOME/Documents/as400/screens&amp;lt;/code&amp;gt;, with the file names being in the format &amp;lt;code&amp;gt;screen-&amp;lt;yyyyMMdd-HHmmss&amp;gt;.[txt|png]&amp;lt;/code&amp;gt;.&lt;br /&gt;
I&#039;d suggest reviewing the script and customizing it to your liking before running it for the first time.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from org.tn5250j.tools.encoder import EncodeComponent&lt;br /&gt;
&lt;br /&gt;
from java.text import SimpleDateFormat&lt;br /&gt;
from java.util import Date&lt;br /&gt;
from java.lang import String&lt;br /&gt;
from java.lang import StringBuffer&lt;br /&gt;
from java.lang import System&lt;br /&gt;
from java.io import File&lt;br /&gt;
&lt;br /&gt;
def fillBuffer(screen, sb):&lt;br /&gt;
    chars = screen.getScreenAsChars()&lt;br /&gt;
    c = screen.getColumns()&lt;br /&gt;
    l = screen.getRows() * c&lt;br /&gt;
    col = 0&lt;br /&gt;
    x = 0&lt;br /&gt;
    while x &amp;lt; l:&lt;br /&gt;
        sb.append(chars[x])&lt;br /&gt;
        if col == c:&lt;br /&gt;
            sb.append(&#039;\n&#039;)&lt;br /&gt;
            col = 0&lt;br /&gt;
        x += 1&lt;br /&gt;
        col += 1&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------------- tn5250j printScreen script start ------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
home = System.getProperty(&amp;quot;user.home&amp;quot;)&lt;br /&gt;
filename = &#039;screen-&#039; + SimpleDateFormat(&amp;quot;yyyyMMdd-HHmmss&amp;quot;).format(Date())&lt;br /&gt;
filepath = home + &#039;/Documents/as400/screens/&#039; + filename&lt;br /&gt;
&lt;br /&gt;
screen = _session.getScreen()&lt;br /&gt;
sb = StringBuffer()&lt;br /&gt;
&lt;br /&gt;
fillBuffer(screen, sb)&lt;br /&gt;
&lt;br /&gt;
screen_txt = open(filepath + &#039;.txt&#039;,&#039;w&#039;)&lt;br /&gt;
screen_txt.write(sb.toString())&lt;br /&gt;
screen_txt.close()&lt;br /&gt;
&lt;br /&gt;
screen_png = open(filepath + &#039;.png&#039;,&#039;w&#039;)&lt;br /&gt;
EncodeComponent.encode(EncodeComponent.PNG, _session, screen_png)&lt;br /&gt;
screen_png.close()&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;---------------- tn5250j printScreen script end -------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JTOpen/jt400 ==&lt;br /&gt;
&lt;br /&gt;
This is a short list of notes about IBM&#039; open source project [https://github.com/IBM/JTOpen JTOpen] aka jt400.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
JTOpen is the open source software product known as the &amp;quot;IBM Toolbox for Java.&amp;quot; It is also commonly referred to &amp;quot;jt400&amp;quot; or simply &amp;quot;the toolbox.&amp;quot; &lt;br /&gt;
In short, this package provides a set of Java classes that enable applications to integrate with IBM i&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project&#039;s readme reports compatibility between different version of OS/400 as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Toolbox                         Installs on     Connects to&lt;br /&gt;
release         LPP release     OS/400 version  OS/400 version&lt;br /&gt;
-------         --------------  --------------  --------------&lt;br /&gt;
V4R2            5763JC1 V3R2M0  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R3            5763JC1 V3R2M1  V3R2 and up     V3R2 and up&lt;br /&gt;
V4R4            5769JC1 V4R2M0  V4R2 and up     V4R2 and up&lt;br /&gt;
V4R5            5769JC1 V4R5M0  V4R3 and up     V4R2 and up&lt;br /&gt;
V5R1            5722JC1 V5R1M0  V4R4 and up     V4R3 and up&lt;br /&gt;
V5R2            5722JC1 V5R2M0  V4R5 and up     V4R5 and up&lt;br /&gt;
V5R3(*)         5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
V5R4(**)        5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 1.x      Not applicable  Not applicable  V4R3 and up&lt;br /&gt;
JTOpen 2.x      Not applicable  Not applicable  V4R4 and up&lt;br /&gt;
JTOpen 3.x      Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.0-4.2  Not applicable  Not applicable  V4R5 and up&lt;br /&gt;
JTOpen 4.3-4.7  5722JC1 V5R3M0  V5R1 and up     V5R1 and up&lt;br /&gt;
JTOpen 4.8+     5722JC1 V5R4M0  V5R2 and up     V5R2 and up&lt;br /&gt;
JTOpen 6.1+     5761JC1 V6R1M0  V5R3 and up     V5R3 and up&lt;br /&gt;
JTOpen 7.0+     5770SS1 V7R1M0  V5R4 and up     V5R4 and up&lt;br /&gt;
&lt;br /&gt;
(*)  Note: Toolbox release V5R3 is equivalent to JTOpen 4.3.&lt;br /&gt;
(**) Note: Toolbox release V5R4 is equivalent to JTOpen 4.8.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project was originally named &amp;quot;Java Toolbox&amp;quot;, and later open sourced and rebranded as JTOpen 1.x.&lt;br /&gt;
The readme seems to imply that JTOpen (the open source version) has never been compatible with V4R2, however tn5250j is currently using JTOpen 10.5 and it seems to be working.&lt;br /&gt;
&lt;br /&gt;
The reason could be that jt400 is actually a collection of modules, and tn5250j might be using only part of them. As a counter example, the latest ACS uses JTOpen 11.5 and doesn&#039;t work on V4R2, attempting to connect would fail. Tests on that side have pointed out to a possible change in the way JDBC connections are established.&lt;br /&gt;
&lt;br /&gt;
The latest known version of JTOpen that&#039;s able to establish a JDBC connection is 5.3, as verified by running this simple JUnit test:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class JDBCTest {&lt;br /&gt;
&lt;br /&gt;
    @Test&lt;br /&gt;
    public void test() throws SQLException {&lt;br /&gt;
        AS400JDBCDriver driver = new AS400JDBCDriver();&lt;br /&gt;
        DriverManager.registerDriver(driver);&lt;br /&gt;
        Connection connection = DriverManager.getConnection(&amp;quot;jdbc:as400://hostname&amp;quot;, &amp;quot;user&amp;quot;, &amp;quot;pass&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Running this test using JTOpen 5.4 against V4R2 will result in a &amp;quot;General security error&amp;quot;, which is the same error you&#039;d get when trying to start a 5250 session on ACS.&lt;br /&gt;
&lt;br /&gt;
Specifically, the AS/400 returns a: &amp;lt;code&amp;gt;SQL state 08004: The application server rejected establishment of the connection.&amp;lt;/code&amp;gt;[https://www.ibm.com/docs/en/db2/9.7?topic=messages-sqlstate]&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1354</id>
		<title>User:Rogueai</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1354"/>
		<updated>2023-06-03T15:37:04Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page currently serves as my &amp;quot;braindump&amp;quot; to keep track of various findings while I explore the AS/400 world. &lt;br /&gt;
&lt;br /&gt;
All the information available here is tested on the machine available to me: AS/400 9406-170 V4R2&lt;br /&gt;
&lt;br /&gt;
== Screenshot script for tn5250j ==&lt;br /&gt;
While researching and trying out new things, I often find myself taking screenshots or saving the screen content as text.&lt;br /&gt;
To ease this process I wrote a simple jython script that can be used with tn5250j.&lt;br /&gt;
&lt;br /&gt;
The script saves the current screen as both a txt and a png file.&lt;br /&gt;
&lt;br /&gt;
The script must be placed inside &amp;lt;code&amp;gt;$HOME/.tn5250j/scripts&amp;lt;/code&amp;gt; as a python source file, e.g.: &amp;lt;code&amp;gt;myScript.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
It can then be referenced from the &amp;quot;Macros&amp;quot; menu. A keybind can also be assigned to further ease the process.&lt;br /&gt;
&lt;br /&gt;
Currently, output files are stored in &amp;lt;code&amp;gt;$HOME/Documents/as400/screens&amp;lt;/code&amp;gt;, with the file names being in the format &amp;lt;code&amp;gt;screen-&amp;lt;yyyyMMdd-HHmmss&amp;gt;.[txt|png]&amp;lt;/code&amp;gt;.&lt;br /&gt;
I&#039;d suggest reviewing the script and customizing it to your liking before running it for the first time.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from org.tn5250j.tools.encoder import EncodeComponent&lt;br /&gt;
&lt;br /&gt;
from java.text import SimpleDateFormat&lt;br /&gt;
from java.util import Date&lt;br /&gt;
from java.lang import String&lt;br /&gt;
from java.lang import StringBuffer&lt;br /&gt;
from java.lang import System&lt;br /&gt;
from java.io import File&lt;br /&gt;
&lt;br /&gt;
def fillBuffer(screen, sb):&lt;br /&gt;
    chars = screen.getScreenAsChars()&lt;br /&gt;
    c = screen.getColumns()&lt;br /&gt;
    l = screen.getRows() * c&lt;br /&gt;
    col = 0&lt;br /&gt;
    x = 0&lt;br /&gt;
    while x &amp;lt; l:&lt;br /&gt;
        sb.append(chars[x])&lt;br /&gt;
        if col == c:&lt;br /&gt;
            sb.append(&#039;\n&#039;)&lt;br /&gt;
            col = 0&lt;br /&gt;
        x += 1&lt;br /&gt;
        col += 1&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;--------------- tn5250j printScreen script start ------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
home = System.getProperty(&amp;quot;user.home&amp;quot;)&lt;br /&gt;
filename = &#039;screen-&#039; + SimpleDateFormat(&amp;quot;yyyyMMdd-HHmmss&amp;quot;).format(Date())&lt;br /&gt;
filepath = home + &#039;/Documents/as400/screens/&#039; + filename&lt;br /&gt;
&lt;br /&gt;
screen = _session.getScreen()&lt;br /&gt;
sb = StringBuffer()&lt;br /&gt;
&lt;br /&gt;
fillBuffer(screen, sb)&lt;br /&gt;
&lt;br /&gt;
screen_txt = open(filepath + &#039;.txt&#039;,&#039;w&#039;)&lt;br /&gt;
screen_txt.write(sb.toString())&lt;br /&gt;
screen_txt.close()&lt;br /&gt;
&lt;br /&gt;
screen_png = open(filepath + &#039;.png&#039;,&#039;w&#039;)&lt;br /&gt;
EncodeComponent.encode(EncodeComponent.PNG, _session, screen_png)&lt;br /&gt;
screen_png.close()&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;---------------- tn5250j printScreen script end -------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1353</id>
		<title>User:Rogueai</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=User:Rogueai&amp;diff=1353"/>
		<updated>2023-05-29T05:47:40Z</updated>

		<summary type="html">&lt;p&gt;Rogueai: AS/400 personal notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rogueai</name></author>
	</entry>
</feed>