Connecting to AS400 from another platform

Connecting to AS400 from another platform

Connecting to AS400 from another platform :

The section below describes the steps to go through, if you want to monitor output queues with spooled files on the IBM i platform from an InterFormNG2 installation on another platform e.g. Windows or Linux.

 

If you simply want to monitor an IFS folder from e.g. a windows PC, then you do not need to install InterFormNG2 on the IBM i platform like described in this section. If you however wants to print to an output queue on the IBM i, then you should read the section, print to an output queue without IFORMNG2.

 

You need to do these steps:

 

1.Install InterFormNG2 on the IBM i platform. You might not need to start the IFORMNG2 subsystem.

2.After the installation of InterFormNG2 you need to add a license code in the green screen of IFORMNG2 via the command, IFORMNG2/IFORMNG2, and option 91. License. You can get the license code via your local InterForm support. The license code entry screen looks like below:

 

 

 Work with InterFormNG license code(s)                                    

                                                                          

  License is validated on system with:                                     

  Serial no . . . . . . . . . : 785F48X                                    

  Processor feature . . . . . : EPXK                                       

                                                                          

  Primary License:                                                         

   Expiry date  . . . . . . . :  20300101                                  

   License type . . . . . . . :  00 ( 00=*ALL , 01=*XML , 02=*SPLF )       

   License code . . . . . . . :  35C27E9EE3C77615B931861F890F921D          

   License status . . . . . . :  License Valid                             

                                                                          

  Secondary license:                                                       

   Expiry date  . . . . . . . :  *BLANKS                                   

   License type . . . . . . . :     ( 00=*ALL , 01=*XML , 02=*SPLF )       

   License code . . . . . . . :                                            

   License status . . . . . . :  License not found                         

                                                                          

  NG2 hosted License found:                                                

   License for XML  . . . . . :  License check timeout                     

   License for SPLF . . . . . :  License check timeout                     

                                                                          

  F3=Exit         F12=Cancel                                               

                                                                         

 

3.Install InterFormNG2 on the other platform i.e. Windows or Linux and make sure, that you have a valid license code for this installation as well.

4.Now you need to change the contents of the file, "application-default.properties". The file is on the Windows platform found in "C:\Program Files\InterFormNG2". Here you need to add the line below (after taking a back up of the file):

enable.as400.functionality=true

5. If you also want to run the IFORMNG2/NG2CMD command, then you also need to add the line enable.as400.commandLine=true to the same configuration file. For the commands to trigger the other server you also need to setup the connection via the configuration file, ng2CommandAPI.properties, which is described in the section, Setup InterFormNG2 AS400 command API.

6. Now you need to stop and start the InterFormNG2 service.

7. Inside InterFormNG2 on the Windows/Linux machine we also need to sign on to the remote IBM i machine. You first need to sign on as a system admin e.g. the user ID "admin". Now select 'System' under the system settings:

NG2_IBMI_access_0001

 

On the right you can now refer to the IBM i as well as a valid User ID and password for the communication:

 

NG2_IBMi_Connection_0002

 

Encrypted connection to IBM i

Here you can choose to use an encrypted connection, if you activate the Encrypted connection (TLS) option. If you activate this option a certificate is required. Normal support only includes the support of certificates, that are known by the used Java distribution on the client side and trusted on the host side (IBM i). On the host (IBM i) side you need to install the certificate and assign the certificate to the used applications similar to this: https://interform400.com/manuals/en/if400/ssl-connection-for-the-designe.html.

 

After entering the information you need to save it with the save icon on the bottom right. You should refer to the system log in order to be sure, that InterFormNG2 is actually able to sign on to the AS400.

 

8. Now you should be able to access the output queues of the IBM i. You can load spooled files from any output queue, that the user has access to and you can also setup InterFormNG2 to monitor output queues for new, released spooled files.

9. It is also highly recommended to stop the unnecessary jobs (or rather prevent them from starting), on the IBM i ( AS400 ) platform, if you are monitoring output queues from another platform/machine. You can do that via the IFORMNG2 menu. You can access the menu via the command, IFORMNG2/IFORMNG2. With this command you will gain access to the IFORMNG2 main menu:

 

 

 IFORMNG2                InterForm NG2 Main Menu                              

                                                                              

 Select one of the following:                         System . . . :  PMK250  

                                                      User . . . . :  KSE     

    Administration                                    Version  . . :  1.8.0   

      1. Work with monitored output queues                                    

      2. Work with XML definitions                                            

      5. Work with IFORMNG2 output queue                                      

                                                                              

     10. Start IFORMNG2 subsystem                                             

     11. End IFORMNG2 subsystem                                               

     12. Work with IFORMNG2 subsystem                                         

                                                                              

     31. Display print service log                                            

     51. Adjust CPI - *AFPDS configuration                                    

     91. License                                                              

     92. Change NG2 installation                                               

                                                                              

 Selection or command                                                         

 ===>                                                                         

                                                                              

 F3=Exit   F4=Prompt   F9=Retrieve   F12=Cancel                               

 

 

You can decide what service jobs to start, if you here select option 92. Change NG2 installation:

 

 

                       Configure IFORMNG2 Startup (NG2SETUP)                     

                                                                                

 Type choices, press Enter.                                                     

                                                                                

 IBM I Queue Monitor  . . . . . . > *ACTIVE       *ACTIVE, *INACTIVE, *SAME     

 NG2-Server (Output generator)  . > *ACTIVE       *ACTIVE, *INACTIVE, *SAME     

 CommandLine to NG2 . . . . . . . > *ACTIVE       *ACTIVE, *INACTIVE, *SAME     

 QIBM_QSH_CMD_OUTPUT - *JOB . . . > NONE                                        

                                                                                

                                                                                

 JAVA_HOME Blank=System default   > '/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit'

                                                                                

                                                                                

                                                                                

 JVM_MEMORY . . . . . . . . . . . > '-Xms2g -Xmn1g -Xmx3g'                      

 Use jt400Native.jar  . . . . . . > '-Dloader.path=/QIBM/ProdData/OS400/jt400/li

 b/jt400Native.jar'                                                              

                                                                                

                                                                                

                                                                                

                                                                        More...                                                                 

                                                                               

 

If you want to use the Spool2XML module to convert spooled files into XML via converted printer files, then you should keep the first option, IBM I Queue Monitor active, but if you simply want InterFormNG2 to monitor output queues itself, then you should set this to *INACTIVE.

 

In the described setup you want to run the NG2 Server on another platform, so here you would probably set the second option, NG2-Server (Output generator) to *INACTIVE. If you want to use AS400 commands, then you do need to start the IFORMNG2/IFORMNG2 subsystem, but the IBM i Queue monitor and the NG2-Server can both be inactive.

 

 

If you are processing files in InterFormNG2 while running on another platform (and these files are not spooled files), then you can print to an output queue on an AS400 (iSeries or IBM i) without installing InterFormNG2 on the IBM i, but you still need to create two objects on the IBM i in order to be able to do that:

 

1.You need manually to create the library, IFORMNG2 with the command: CRTLIB LIB(IFORMNG2).

2.You need to create the printer file, IFORMNG2/DFTPRTF. You can e.g. do that by copying the printer file, QGPL/QPRINT with this command:

CRTDUPOBJ OBJ(QPRINT) FROMLIB(QGPL) OBJTYPE(*FILE) TOLIB(IFORMNG2) NEWOBJ(DFTPRTF)

 

If you do not create the library (and the printer file), then you will see the error, Printer not available in the job log and in the details you can see, that the IFORMNG2 library is needed with the error: CPF9810 Library IFORMNG2 not found.

 

NG2AS400Install0001

 

If you create the library and the printer file like described above, then you should take care, if you later want to install InterFormNG2 on the IBM i. In order to avoid errors during the install you will then first need to rename or delete the current IFORMNG2 library, which only contains the printer file.



Monitor an IFS folder from a Windows PC:

This section is for you, that wants to monitor an IFS folder from a Windows PC e.g. for XML files.

 

 

Prerequisites

These are the prerequisites for monitoring an IFS folder on an IBM i machine from e.g. a Windows machine:

 

1.The netserver must be running on the IBM i. You can start it with the command: STRTCPSVR *NETSVR.

2.You need to add a file share to the directory, that you want to monitor, if this is not shared already.

3.You need to be sure, that the InterFormNG2 service is running under a user profile on the Windows machine, that match a user ID and password on the AS400/IBM i.

4.The user ID, that you use need to have write access to the folder, that you are monitoring.

5.When you setup the folder to be monitored in InterFormNG2, then you should set it up as \\<Machine name or IP-address>\<Share>, where <Machine name or IP-address> is the machine name or IP-address of the IBM i and <Share> is the share name. You do that with the Read from file workflow input type. This is an example of how this can be configured:

 

NG2FileShare0006

 

 

 

Add a file share to a folder in the IFS

One way to add a file share to an IFS folder is via the Navigator for i. You can see the list of the current shares on the right, if you select File Systems and File Shares:

 

NG2FileShare0001

 

Now you see the shares on the right - both the share names and the path for each:

 

NG2FileShare0002

 

 

Remove a file share

If you want to remove a share, then you can select one or more shares, Select Actions in the top and then Stop Sharing.. and OK on the next screen.

 

NG2FileShare0003

 

 

Add a file share

If you want to add a new share, then you need to click the Create File Share option below:

NG2FileShare0004

 

- and then this is shown on the right:

 

NG2FileShare0005

 

The entry fields and options are these:

 

Share name

This is the 'share folder', that you want to refer to in InterFormNG2, when you monitor this directory. It is normally a good idea to use the same name for the share name as the folder, that you are sharing, but this is your choice.

 

Description

A description of the share.

 

Access

InterFormNG2 need Read&Write access as InterFormNG2 is moving the input file into subfolder.

 

Path name

The path to the folder, that you want to share.



    • Related Articles

    • Move InterfoNG2 from IBM i to another platform

      This section is meant as an aid for the customers, that already has InterFormNG2 running on the IBM i platform, but want to move core InterFormNG2 onto another platform. The reasons for doing that can e.g. be: •Free up resources on the IBM i and move ...
    • Move InterFormNG2 from IBM i to another platform

      This section is meant as an aid for the customers, that already has InterFormNG2 running on the IBM i platform, but want to move core InterFormNG2 onto another platform. The reasons for doing that can e.g. be: •Free up resources on the IBM i and move ...
    • Create a keystore on the Windows platform

      You might need to create a keystore on the Windows platform e.g. for the preview client or the remote client. This is covered below in details. •Start a command prompt. You can e.g. do that by searching for an app with the name cmd. •Change the ...
    • Start/stop InterFormNG2 on Windows platform

      Before you start the InterFormNG2 service you should consider, if the port number (default 8086) is to be used. If not, you can change the port number. The normal, manual start/stop of the InterFormNG2 service is described below, and the procedure to ...
    • Create a keystore on the IBM i platform

      You might need to create a keystore on the IBM i platform e.g. for the preview client or the remote client. This is covered below in details. You should NEVER place the keystore file in any of the data- or program directories for InterFormNG2, as a ...