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


We run BRMS nightly. Last night the tape failed. The snapshot was created. Is there a way to push this snapshot to tape so we don’t lose a backup?

Thank You,

In my AS400 system, there are around 20 applications which runs and occupies around 90% of CPU.

I would like to Know the process to find how much a particular application is putting load on that CPU.

Example, app1 takes 20% of CPU out of 20 applications.

Can somebody shed some lights on how to find this.


One of our application is running on V5R3 AS400 server.
This application is running slow as there lot more applications running parallely on this system.
Admin tried all the tunings but there is no more memory to accomodate any load.

So we are planning application alone to move this to latest AS400 version with a very good hardware configuration.

I understand that we cannot upgrade the V5R3 to V7R2.

But can we move the application from V5R3 AS400 server to a brand new V7R2 server with a good Hardwae configuration.

When i say move, i would like to do create a SAVF on V5R3 and restore that on V7R2.

Please let me know if you have any other suggestions or thoughts.


We have a powerbuilder application which connects to AS400.

When it runs some AS400 cobol program through ODBC connection, I see in the job log with below error

RRMGlobals::getIndex(char,int)(117)] Unable to get index: 6 mode: S
Object name  is not valid.

When i press F1 and F9, then i see the program name as PSCOMMON/NW0002A.

Looks like this is some system program.
When i checked this program on our system, it doesn't exist.

can somebody tell me what this program is all about.

In our client system they have 2  QPRTJOB  job. when we are coping file using CPYSPLY


at that time, we are getting error A duplicate job named 599171/XXX/QPRTJOB was found.
can we give any unique keyword which who can differentiate these JOB.  
Requirement - I’m wondering if we could use any other value in some of the CPYSPLF parameters to make the spool file unique. In looking over the OVRPRTF and CPYSPLF commands is there anything we could use to isolate the spool file we are looking for:
Spool file creation date- could we use the CPYSPLF/CRTDATE to isolate the spool file further?

when used same throwing same error

Thanks in advance
Hi Experts,

I have a DB2-400 table that contains a field of type 'G' (DBCS-Graphic data  30-pos) this field contains some text (some records chinese)
If I try to print this field I get all data except the chinese info.

What do I have to change in the PRTF-DDS and/or the RPG to get this on my output
Is there a difference bwteen selecting rows in the WHERE clause on in the JOIN clause.

For example,

  FROM orderHdr t1
  JOIN orderDtl  t2 on t2.orderno = t1.orderno
  WHERE t1.orderno = 100
       AND t2.status = ' '

as opposed to

  FROM orderHdr t1
  JOIN orderDtl  t2 on t2.orderno = t1.orderno  AND t2.status = ' '
  WHERE t1.orderno = 100

I would think the second method would be faster as I'm thining that join is only to rows where the status is blank.

Thanks for your thoughts,

Hello all,
As the title says I need to make a cronjob to check a remote ftp folder if a file exists. If so, it needs to email me. I have a Ubuntu web server I can use that is setup to email out and all that, is it best to try to make a bash script, or PHP to accomplish this? Does anyone know of any examples that might help me from having to start from scratch?

I currently have a bash script I have made that already connects to the ftp server and downloads, backsup the file into a folder, then copies the file to another folder on an as400, then deletes if off the FTP once it finishes, so I am wondering if maybe I can implement emailing into my bash script, but I am not even sure how to setup a cron job on an as400 (IBM iSeries 720). So I was thinking that maybe a PHP script on my Ubuntu web server might be easier to just connect, see if a file is in the folder if so, send me an email so I can then run my aforementioned script, or even better, make it run that script automatically.

If anyone has any suggestions, I would greatly appreciate it.
Hi Experts,

While using the QLIRLIBD API, I discover that some libraries take a lot of time (up to several minutes), while other libraries take a few seconds.
the size of the library an the number of objects. It seems that there is no relation between size/objects and the required time to analyse the library.

What causes this delay and how can I speed it up?
I have very simple code to check if the last entry of an email address is a '.' and if it is remove it. If multiple '.' are entered remove them all.

The issue is if my email address exceeds 30 characters. I found other posts if the variables are varying in length or %trim is used. I do neither.  I don't see why this would have an issue. Please see attached for debug display, definitions, etc.  

Thank you. -substr-length-error-.docx
Hi, I am new to Mimix process and while reviewing some Mimix guide I came across below two command for which I could not find much information.
Will appreciate if someone can provide basic understanding of what a data group is and why it is required in Mimix process and explain intent of below 2 command.  Thanks in advance !!

I have installed Client Access (7.1) on our MS SQL 2014 server.  I am using the IBMDA400 OLE driver to create a linked server to DB2 database one the iSeries. When I run a select statement on the data in a table a couple of fields are legible but most did not translate.

The fields that translate properly are ccsid 37 the ones that did not are ccsid 65535.

I have read several posts and tried putting various translation options in the Provider string.  It seems as soon as I add add any additional string other than the "Default Collection = xxx" in the provider string the connection test fails.

Can anyone steer me in the right direction?
I need to calculate a prorated amount of annual premium in free rpgle and account the number of days in leap years.

say a company's annual premium would be $1000 and they sign up on 11/01. I only need to charge them for 61 days of the yearly premium.

anyone have any date math examples for doing this?
How do i copy  from an excel file paste on as400
please help for this

    Read hpol01;                                          
    DOW NOT %EOF(HPOL01);                                  
   exec sql SELECT PPROD,PVEND,max(PEDTE) AS PDTE          
   FROM hpo where pwhs='CP'  GROUP BY PPROD , PVEND;      
    PPPROD= PPROD;                                        
    PPVEND= PVEND;                                        
    Read HPoL01;                                          
    write(e) PURHL1;                                      
     *InLR = *On ;
This is an ongoing project to sync Office Vision on a 610 (v4r5) to backup system a 170 (v4r4).

We did a full system save of the main system and restored it to the backup system, changed license keys, IP address, and address Id on the backup machine then did a full system save on it.

The restored receivers where not what I expected (please see attached document). I've include screen shots and steps I took. The questions are posted at the bottom of the document. Basically I'm not able to restore the journals (have not tried apyjrnchg with the seq numbers).

Thank you for any assistance.
Lynn Sync-Information.docx
Hi experts,

I try to get a list with abnormalities between object(source)date and source change date.

I think ANZUSROBJ would do the job, but when I start this, I get the error:
The call to program QCMDEXC ended in error (C G S D F).

In the log I see:
ASP group *NONE not set for thread X'000000000000008C'.    
-------8<----------- hundreds of times ---------------------------------    
ASP group *NONE not set for thread X'000000000000008C'.        
ASP group *NONE not set for thread X'000000000000008C'.        
Functiefout opgetreden. CPFB8E9 niet voorzien door QUSY2CO1 bij
  programma-instructie *N, systeeminstructie X'030D'.          
The call to program QCMDEXC ended in error (C G S D F).        

I also checked the tool CHKOBJSRC, but that can't deal with RPGLE nor serviceprograms
Our developers have been creating a lot of SQL Stored Procedures lately.  When they are doing this - the default authority that is "granted" to the new object is basically *PUBLIC *USE and then *ALL access to the user profile who created the Stored Procedure. The problem is that the other developers who work on the application are then not able to work with the new stored procedure.

Is there an option to "adopt" the authority of the library which the Stored Procedure is created in?  It would be ideal to just adopt the authority of the parent library - which is set up the way we want it to be.

I appreciate any guidance.
Update: I'm trying to sync office vision email changes between to old systems for recovery purposes. Office vision is the only application running both systems:  active system is a 610 v4r5 and the backup system is a 170 v4r4.  

Sync users, configuration, etc. once. Then any changes made to the live system (610) will also be made to the backup system (170) manually for these areas. However, documents and email changes by users need to be synced a few times throughout the day. (depending on what the final solution will allow due to availability, speed, etc.) The hope is to sync the folders/files & email every half hour to hour.

 (should be noted I'm a newbie to journaling)

I would like to use QAOSDIAJRN for email recovery. Documents, as well, if they are recoverable is the same journal. Otherwise SAVRSTDLO will be used to folders/files. The SAVRSTDLO was successful with my own library but I have not done a full test until I get the email working. (I have created a job to grant myself permission to handle email for all current users; if the savrst is required.)

I have not tried remote journaling with redirect because it seems to me the results would be the same (newbie).  Plus,  I'm hoping not to mess with system journals. Whether I use SAVRSTOBJ on the receiver and pass it to the remote system or use remote journaling it seems either way I end up with a receiver on the remote system which must somehow be recognized by the system journal …
Our shop has not used journal until a couple months ago when I added them to a couple master files for audit trail purpose. So, my experience with journaling is very limited. I don’t mind digging but would like to not chase my tail for hours on something that is not possible if I can help it.

Can I add remote journaling to a system journal? Specially, QAOSDIAJRN (Journal for DIA files). I have been researching how to setup a remote journal and thought I read somewhere remote journals could not be done on ‘Q’ files outside QGPL. Has anyone done a remote journaling on this system journal before? Any tips?

Thank you in advance!
We have a user who is having an issue with her messages not breaking to her screen for some reason.

Her user profile is set to *BREAK and I verified that her MSGQ is set to *BREAK.

Not sure what else would be causing this issue? Any ideas?

My company is using AS400 Micro Focus Rumba 8.2.0 SP0. Every time we want to run a report we must spool file the query and send it to our email, then we import it into excel. but I wanted to know if we can directly connect Excel to Rumba.
We have a few overlays layed out as an image file and the text prints on the white space in he middle before our logo and after footer text. And then that is saved as a .ovl file imported to the 400 and then the trial and error begins when the letter prints. oops its covering the signature or opps the signature is to low. time to reformat the graphic file and try again. After about 6 or 7 tries of saving the file, uploading and printing its not exactly perfect but it will do.

Is there an easy to do this with out spending half a day working on getting the logo in the right place making sure the signature is correct and in the correct place but not to high up on the page, making sure the txt is right that prints on the letter. And if it is repeating the whole process over again. I know TLAshford has their TLA forms. Is this the best option

We also have a packing-slip that our Warehouse places in each box that needs to be changed as well and they want it to resemble something like what Besbuy/Target does


On an apache server on iSerie V7r1M0, in configuration, how to transform one URL by another one .

For Exemple :

Many thanks for help.
i am new in programming field and trying to write SQLRPGLE but not get success can any one help me for resolved the error.

 FILIL01    IF   E           K DISK                              
 fOPBNL1    o    e           k disk                              
 fOPBNL1    IF   e           k disk                              
 D ILI           e ds                  Extname(ili:IPI500L)Inz  
 D GADJ            s             11P 3 inz(*ZEros)              
 D OPROD           s             15A   inz(*Blanks)              
 D GREC            s             11P 3 inz(*ZEros)              
 D GOPB            s             11P 3 inz(*ZEros)              
 D GISS            s             11P 3 inz(*ZEros)              
     read ilil01;                                                
     Dow Not %Eof(ILIL01);                                      
     if LWHS ='CX';                                              
          OPROD= LPROD;                                          
          GOPB= LOPB;                                            
          GREC= LRCT;                                            
          GISS= LISSU;                                          
          GADJ= LADJU;                                          

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