IBM System i

IBM i, formerly known as AS/400, is a proprietary, midrange, object-based operating and application system. It includes a relational database, a menu-driven interface, support for multiple users, block-oriented terminal support and printers, and supports security, communications, and web-based application servers including Websphere, Apache and Tomcat.

Share tech news, updates, or what's on your mind.

Sign up to Post

Does anyone know if it is  possible  to submit a remote command on an iSeries server using SSH (sftp) using a different user than what is configured for SSH?

For example, if I wanted to make a change to a user profile, I would run this command:


If I wanted to run that command as another user (called SUPERUSER) - I would run:


Wondering if there is a way to submit the above command (using the SUPERUSER user profile) via SSH (with the cavaet that the SUPERUSER user profile is not the user configured for SFTP. The following code "should" work - but when it does it tells me I don't have access to the CHGUSRPRF command (which the SFTPUSER doesn't - but the SUPERUSER does)


Hopefully that makes sense

I was just hoping to get around having to configure SFTP for the SUPERUSER if I didn't have to...

Any help would be appreciated.
Does anyone know how to display the current temperature for an IBM i server?
Have a vendor product CT FreightRater, an automated rating database used to calculate rates for loads we haul. We can enter hundreds of scenarios for rates like mileage, flat rate from point to point.
FreitRater recently did a changeover from running their WebService using XML, to using JSON. I have my JSON data conversion code ready, but need assistance setting up the front parameters that allow the HTTP URL, validation, etc.
In my RPGLE program, I use a product called RPG-XML Suite from Krengeltech. It supplies API's I can use to formulate my data into the JSON format, and that's working fine.
I can test through a program on the FreitRater Server called 'MultiRater'. This allows me to 'drop' in formed JSON statements to test against the rating database, and receive a response.
Unfortunately, FreitRater is unable to provide the specs for what these parameters are.
The only example I received from them to allow testing sending a RatingRequest example (C# .NET), is attached.

I'm also including the RXS_TransmitDS_t data structure used to 'send' to the FreitRater WebService in an attachment.

I need a 'translation' of sorts between the C# .NET example, to be able to  plug in those parameters to the RXS_TransmitDS_t data structure.


I need my 400 to host FTPS.  I have had FTP running for decades.  I am familiar with DCM and I have a certificate assigned to the FTP app.  This is the same cert we use for HTTPS and it works great.  It is from a well know Certificate Authority.

To get started, I am testing from inside the network or thru a point to point VPN to avoid any firewall issues.

To make it even easier to configure, I am testing from at 7.3 box to a 7.3 box.  Both are current with PTFs.
This command yields the below results: FTP RMTSYS('') PORT(*SECURE)  

  Connecting to remote host using port 990.                        
  Connection is secure.                                                      
  220-QTCP at FTP.HICKSINC.COM.                                              
  220 Connection will close if idle more than 5 minutes.                    
> bows                                                                      
  331 Enter password.                                                        
  230 BOWS logged on.                                                        
   OS/400 is the remote operating system. The TCP/IP version is "V7R3M0".    
  250  Now using naming format "1".                                          
  257 "/home/BOWS" is current directory.                                    
> ls                                                                        
  227 Entering Passive Mode (10,1,1,1,109,149).                            …
Does anyone know if there is a way to have a report sent out, daily, of what is running in QBATCH?  I'm assuming the responsibility of a couple of functions on an iSeries and it seems odd, that the current guy logs in every morning just to see if certain UIF printers are running.  I'd like a report sent out at like 5 AM that shows me the current status of those UIF printers.  

I can't purchase any other software, so I'd need to develop something in house or via the system i Navigator, if it is possible.

Thanks in advance.

Hi Experts,

In a DDS screen definition, someone used radio buttons (SNGCHCFLD). Cool, never used that :-)
This selection field is sometimes generating an error in the underlying background program, took me some time to find out why, the follow is happening:
In DDS I see:
CHOICE(1 'Day')
CHOICE(2 'Week')
CHOICE(3 'Month')
In the program the field SELDWM defined on the SNGCHCFLD is set to 1 (Day is default)
By clicking the mouse it is only possible to select one of the options, so field SELDWM is always 1,2 or 3.
but if the user select with cursor-keys and space-bar, he/she can also switch-off all choice fields and set the field on 0.

I can set the field to 1 if it is 0, but I prefer to make it impossible to deselect a choice with the space-bar,
or define a default in DDS, so that deselect is automatic default button on (visible).

Is there an option?
When using Attachmate Reflection Workspace to start a session with my 5250 emulator, I get this annoying error when I try to save the workspace.  Please see the attached screenshot.  Attachmate-Error.tif

To get out of this error, I have to go the Task Manager and end the program, which is very annoying.  I notice the Red X that is through the toolbar at the top, so I'm presuming it has something to do with visual cues or the like.  I've tried so much as disabling all the visual effects and just going to performance mode for the system, but that hasn't helped either.

Any thoughts or suggestions on this would be greatly appreciated.

The specs on my PC are:

Windows 10 Professional 64 bit
Dell Latitude 7480 Laptop, Core i5 with 8 GB of ram

Does anyone know how I can force a certain message ID (MCH1210) to be displayed in the QSYSOPR message queue?  Our developers are asking that we direct anytime this message comes up - to make it show up on the QSYSOPR MSGQ.  Is this possible?  They don't want to dump the message as it is a lot of work to go through each of our servers and have to answer the messages and go through the dumps. They would like it to be "documented" on the QSYSOPR MSGQ so that they can go back and just search that MSGQ at a later time to see what was going on with the issue.

Any guidance would be much appreciated.

Hello, I am attempting to use the QSQGNDDL api on the IBM i. I am running V7R2 and have attached the source I have written. Whenever I execute it I receive an SQL7042. I have double checked my parameters against posted code on the net and don't see any issues in that area. I tried downloading some posted code and running that and get the same result. Are there any caveats that are unpublished? I know this issue has risen in the past and I have reviewed those articles. Again, it looks like my code is correct. Any help would be appreciated!

ScottPrint Screen of a debug session showing the SQL7042 errorrtvsqlsrc.txt
. I am using vsphere srm, when I am reprotect the vm after fail over its failed due to below error place holder of vm is missing. Now the vm is off state in both side. Any one can help me for resolve this issue
HTTPAPI_debug.txtWS HTTP API(library LIBHTTP).
IBM-i Client Connection to Webserver: handshake problem.  
Immediatelly after clientHello, the  server resets  connection.

ibm-i Joblog messages .
   Message . . . . :   (GSKit) An operation which is not valid for the current
     SSL session state was attempted.                                          
   Cause . . . . . :   No additional online help information is available.    
 40   18/01/19  15:36:49.874491  HTTPAPIR4    LIBHTTP     *STMT    RSUCISLO2  
   From module . . . . . . . . :   HTTPUTILR4                                  
   From procedure  . . . . . . :   HTTP_CRASH                                  Handshakke-problem-from-7_3-LPAR.docx
   Statement . . . . . . . . . :   4068                                        
   Message . . . . :   SSL Handshake: (GSKit) I/O: A connection with a remote  
     socket was reset by that

iSeries CPF5140  Telnet-session ends abnormal.

Telnet connection is from JBOSS server ( Applinx server ) to host (iSeries)
CPF5140 is caused by ending session without SIGNOFF.

Applinx has his own specific language base on librrary ( maybe java ).
    Input  parameters for CreateEmulationsession : UserName and password.
    Output parameter is sessionID
Please see attached file, skripting . . .

session may be disconnected and CPF5140 Joblog appears on iSeries Host.
Applinx Skript for session handling  
How to add SIGNOFF in Skript, to avoid CPF5140 ?

I am reviewing some RPG logic, in conjunction with a question I posted about a week ago.  I think the way this logic is written doesn't suit the needs of what I'm looking to be the end result.  Below is the code in question...

  *IN88     CABEQ*ON       ITSN      
  ELRET     CABEQ0         ITSN      
  ELRET     IFGT 0                   
  ELRETT    IFGT 0                   
  ELRETS    IFGT 0                   
            GOTO BYPASS              

Open in new window

I've probably included more code than needed.  Essentially, I'm looking to see that if ELRET and ELRETT and ELRETS are greater than 0, to go to bypass.  It looks like my program isn't doing this, based on the results from last week's run.  I've attempted to change the second and third IFGT to ANDGT; however, when I go to compile, I get an error code 50 (I believe, but don't quote me on that.).

I was hoping if someone could confirm for me that my suspicions are right and that the code needs to be altered to ensure that all the IFGT lines are evaluated together.


Hi.  We haven't changed our network structure on the IBM I for years and only recently have a need to as all of our processes have been pretty much contained on the I.  I'm self taught in IBM maintenance and learning as I go but I think the changes I need to make are pretty benign but I need some advice.    

I noticed my host table is totally out of whack with my network so I need to remove and correct some entries.  I'm really thinking about only leaving those entries referencing my Virtual IP on the I and otherwise not using a host table.  Ultimately, I need to add some DNS entries and allow external resolution.  Currently my Host name search priority field under CHGTCPDMN is set to *LOCAL.  Is it necessary to change to *REMOTE to make DNS active?  Would this change require an IPL?   If I leave that setting at *LOCAL, Do I need to make a specific entry in my host table or will lookups query my host table and then automatically jump over to DNS for those  queries without a corresponding entry, provided I have the DNS server addresses listed?  
I guess my question(s) are, What is best practice in this case?   Do Host table changes or DNS changes require any service restarts or an IPL or can I just make these changes on the fly?
I am building a new LPAR and attempting to import a Self-Signed certificate that we have loaded on our other servers.  

I am attempting to import both a CA and a self-signed cert

I am able to import the CA - but I am getting an error when attempting to import the "server/client" certificate.

The steps I am following are:

a.      Select the *SYSTEM certificate store
b.      Click on Manage Certificates
c.      Import certificate
d.      Certificate Authority
e.      Upload the file: /cert/ibmirootca.cer
f.      Name the certificate: IBMIROOTCA

2.      Import the Self-signed certificate
a.      Import Certificate
b.      Server or Client
c.      Upload the file: /cert/ibmissc.cer
d.      Password for self-signed certificate: <cert password>
e.      Name the certificate: IBMISSC

It is at this point that I get the following error:

Certificate Error
Any ideas on this?
Hi Experts,

In a RPG program I use /COPY with qualified names and unqualified names.
/Copy MyFile1.rpgleinc
/Copy MyFile2.rpgleinc
/Copy /Standard/Version9/Rel5/gplcalc.rpgleinc

Using the CRTRPGMOD parameter INCDIR('/Home/user/myPrograms/includes'), it will find the right include-files and the module is created without errors.
When I try to create a program from the module I get the following error:

Message-ID . . . . . . :   CPD5D02      
Message . . . . :   Definition not found for symbol   'getSubSetCustomer'                        

Cause . . . . . :   No definition was found for reference                    
  getSubSetCustomer in *MODULE object MyProg2 in library MYLIB.
  The definition either does not exist or is not of the same data or procedure
  type as the reference.                                                      
Recovery  . . . :   Try the Create Program (CRTPGM) command again, supplying  
  an object that contains a definition for symbol  getSubSetCustomer

Without the INCDIR() and full qualified names, the program is working.

Because of copy/move and maintenance, I prefer to use the unqualified name for most of the include files, is that possible?
Hi Everyone,

I'd just like to confirm a line of code that I'm modifying in an RPG program...

This is what the code currently is:

 MBFTPT    IFEQ 'P'      
 MBSGNP    IFNE 'L'      

Open in new window

I need to add another line for MBSGNP that if it is not equal 'O' as well.  But I'm not completely confident on the syntax of the "or not equal to part".   Can someone assist me with this.

I am the system administrator on the IBM i platform. We have hundreds of printers throughout our enterprise. I recently came on board and have a couple of people that handle day to day operations. One area they spend a significant amount of time on is printer support. It seems when a printer runs out of paper, instead of a simple loading of the paper here are the steps required (sometimes) to get the printers functional again: ENDWTR *IMMED, Vary it off, physically unplug the printer, plug it back in, vary it on and STRPRTWTR. Wow!! This doesn't happen all the time but quite often. If we don't follow these steps, the writer looks active but a spooled files will sit in a PND status and never get to a WTR status. However, with the printer in this status I can use an LPR command to send a SCS spooled file to the printer and it prints fine.  

I should state that we are on V7R2 with the latest PTF's applied.

Attached are two pdf's. The configuration of one of our printers and a joblog when the above condition exists.



I guess what I'm asking is this... Has anyone else run into this? And if so, is there any solution beyond what we are doing? I even tried a vary on with a reset to no avail.
Hi Experts,

I did create a webservice client form an existing wsdl, using the IBM "" tool.
But the result was to complex to understand what I had to do to use it.
So I create an own service wit only 2 values in and 1 value out.
But still I have no clue where to start.

The result of the wsdl2rpg is:
14 C-sources,
1 Cl-source,
2 Rpgle-sources,
3 Rpgleinc-sources

I understand that de CL is compiling the C-sources and create the service program.
But I need some info about how to use the result of the wsdl2rpg generation.

I used the attached WSDL for this test.
(expected output value is Input1 + input2)
How do you copy the records in a member file into a physical file?  I need to export the records in to the member data to an excel file for further manipulation...
Is there a way to see all jobs included under the STATFS command? Besides the Root directory?
AS/400, iseries, System/i help please.  I renamed a library or something and now I cannot log in, with any user id.  It flashes a job log, then gives the sign on back.    I was doing some testing and renamed some test libs and what I did should not have affected me regular user id's.   Any way to bring it up in STRSST mode or something, so I can see the logs and make changes?  I have tried QSECOFR and all the user id's that I know.
Good Morning,

I'm using SPLF2EMAIL (which converts to a PDF and uses SNDDST) to send documents to our users. This work well, but the subject line get changed to the 'document.txt' id instead of the message (verbiage description) sent.  The '*.TXT' is the DOC() value used by SNDDST command. The verbiage I send gets put in the msg() field on the SNDDST command and is the first line in email.  Is there a way to change this to send a more useful subject line instead of the document ID. (preferably the verbiage currently be sent in MSG()).

Thank You in advance.

Sorry, I should have edited this question and not deleted. It is sending the verbiage after the '*.txt' on the description line in gmail when I view via the inbox. However, on my phone it only shows the *.txt.  I was deleting because it is not as clear a question. But decided to re-post because I'm still not sure how to get the verbiage to be the main subject line, or if I can.

Again... Thanks
Problem is : iSeries interactive sessions disconnect unexpected.

With Joblog error-msg CPF2479    "Call stack entry not found",
before disconnect session with CPF5140.

My question is: may be a dependency,  CPF5140 caused by CPF2479 ?
I am asking this, because disconnection may also  be caused  by a betwork failure.
(But nearly in all disconnected Jobs, there are many CPF2479 before . . . )
iSeries menu question - Can I disable the functions keys? I don't want F3/F12 to exit the menu. I want an option selection to be the only way.

Thanks in advance!

IBM System i

IBM i, formerly known as AS/400, is a proprietary, midrange, object-based operating and application system. It includes a relational database, a menu-driven interface, support for multiple users, block-oriented terminal support and printers, and supports security, communications, and web-based application servers including Websphere, Apache and Tomcat.

Top Experts In
IBM System i