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

Hi, we have two tapes to be used for daily backup. and we have scheduled jobs to run the daily backups at night. previously, we only need 1 tape but now, it asks for 2nd tape. we have a program to initialize single tape, but not for 2 tapes. can anyone helps on how to intialize more than 1 tape  for daily backup   (1 week rotation basis). 2 tape cartridges per day, 14 tapes/week. os version: v6r1. thanks.
      PGM                                                                
      DCL VAR(&DAY) TYPE(*CHAR) LEN(4)                                  
      DCL VAR(&DLYVOL) TYPE(*CHAR) LEN(6)                                
      RTVSYSVAL SYSVAL(QDAYOFWEEK) RTNVAR(&DAY)                          
      CHGVAR VAR(&DLYVOL) VALUE('DLY' *CAT %SST(&DAY 2 3))              
      INZTAP DEV(tapxx) NEWVOL(&DLYVOL) NEWOWNID(xxxx) CHECK(*NO) -
 ENDOPT(*REWIND)                                                        
      ENDPGM
0
Get your problem seen by more experts
LVL 12
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Hi experts,

I recently discovered the "SYSTOOLS.HTTPPOSTCLOB" to consume webservices
As long as I give the right input to the WS, it works fine, but I can't figureout how to catch errors.

e.g. I send a wrong ZipCode a Zipcode-service to get an address.
If I do that in SoapUI I get the information:
{"errors": [{
   "status": "400",
   "title": "Bad Request",
   "detail": "postalcode has the wrong format. It should be: 9999XX"
}]}

Open in new window

If i do the same request with SYSTOOLS.HTTPPOSTCLOB, the response is empty (I assume null),
result : GDATA_DATA          CHAR(8000000)        NOT ADDRESSABLE

SQLCODE = -4302
SQLSTATE = '38000'

SQL Diagnostics data:
        ....5...10...15...20...25...30...35...40...45...50...55...60 
   1   'COMMAND_FUNCTION=VALUES INTO;COMMAND_FUNCTION_CODE=-66;DB2_N'
  61   'UMBER_CONNECTIONS=+1;DB2_SQL_ATTR_CONCURRENCY=R;DB2_SQL_ATTR'
 121   '_CURSOR_CAPABILITY=R;DB2_SQL_ATTR_CURSOR_HOLD=N;DB2_SQL_ATTR'
 181   '_CURSOR_ROWSET=N;DB2_SQL_ATTR_CURSOR_SCROLLABLE=N;DB2_SQL_AT'
 241   'TR_CURSOR_SENSITIVITY=S;DB2_SQL_ATTR_CURSOR_TYPE=F;MORE=N;NU'
 301   'MBER=+1;CLASS_ORIGIN=ISO 9075;CONDITION_NUMBER=+1;DB2_MESSAG'
 361   'E_ID=SQL4302;DB2_MESSAGE_ID1=CPF503E;DB2_MODULE_DETECTING_ER'
 421   'ROR=QSQVALUE;DB2_ORDINAL_TOKEN_1=SYSTOOLS.HTTPPOSTCLOB;DB2_O'
 481   'RDINAL_TOKEN_2=HTTPP00013;DB2_ORDINAL_TOKEN_3=java.net.Malfo'
 541   'rmedURLException:no protocol:                               '
 601   '                                  

Open in new window

0
Hi Experts,

We are getting the error message CPF5033 during READ operation in batch program and error message says the below.
"I/O error CPF5033 was detected in file B1PBILH (C G D F)."

When I check the log it says
" Select or omit error on field B1PBILH_1.BTCAR member B1PBILH.  
 Select/omit error on member B1PBILH.                            "

"I/O error CPF5033 was detected in file B1PBILH.                          
Function check. RNX1299 unmonitored by BLR573R1A at statement 0000048100,
  instruction X'0000'.                                                    "

I have checked the record lock and object lock on the file. No locks exist.
I have checked the data for the particular record where to check the junk value. No junk value exist.
And we are getting this error randomly for different records.

Program flow:
Cl program does the OVRDBF and then opnqry on the file and we read the same file in RPGLE with out key.
and we are getting CPF5033 error while performing the read operation on the file.

Please help me to fix the issue. I have attached the screen shot for your reference.


Thanks in advance.

Regards,
Sri
0
While do save/restore operation on *LINK in AS400,I am getting error  "File system error occurred. error number 3474
0
hi.  I am trying to configure mail on the iSeries or AS400.   My only ISP I have access to is verizon.  They have no SMTP servers you can use.  How can I configure the system to send out mail?  I am have other questions concerning this, but can't seem to find one if you have no access to an smtp server.
0
I had this question after viewing Display file Overlay problem.

I have the same problem but with window formats, three of them. Each is in its own program and display file. When program A is called from the menu, it displays its window leaving the original menu screen intact. From activity performed on that window, another program is called, program B, which also displays a window but now, everything behind it is black. This behavior continues for the next program which also displays a window and a black background eliminating everything  previously displayed up to this point.

I have a dummy format in each program with the ASSUME keyword and the one character field at 1,2 and even added the KEEP keyword but it made no difference.

I have not set row and column positions but have selected the default positioning option expecting the OS to position each screen to avoid any issues but obviously, this isn't happening.

Any suggestions?
Mike.
0
We have an issue right now where when our cust service team runs a credit card they at times receive a handshake error. We run a IBM i AS/400 that connects to a backend called Curbstone. Here is a break down of how this works Here is what is supposed to happen.

When credit cards are run curbstone opens a connection to paymenttech.
At this point the IBM I sends along “cipher suite, decryption keys” this information is accepted by paymenttech and the transaction continues.

Here is what is happening now.
Curbstone opens a connection to paymenttech.  At this point the IBM I sends along “cipher suite, decryption keys” this information is now rejected by paymenttech the transaction fails and the handshake error pops up. I have run a trccnn on the IBM i and in wireshark. Both curbstone and paymenttech don't see any issues on their end. I did call paymenttech today and a transaction that I saw on the IBM i didn't get to them resulting in the handshake error. I don't think its an issue with our network because it isn't a constant issue. I thought perhaps there was some job running at the time of the handshake error but that doesn't seem to be an issue. This issue ramps up at between 4pm and 6pm on Fridays. Why? I can't seem to find a reason.
TLS_FAILED_HANDSHAKE.pcap
0
Hi,
Does anyone know of a technique of locking an IBM i spool file so it cannot be deleted while a process is running?

Thank you,
0
How to do manual IPL from HMC on AS400 server . Am not having physical access to server. All remote access to the partition.
What settings should i change?
0
i just need to pass an array to rpg from java but its not running error free.
here is my code

import com.ibm.as400.access.*;
import java.beans.PropertyVetoException;
import java.io.IOException;

public class CallingArrayPgm {
    public static void main(String[] args) throws PropertyVetoException{
      try{
                  
            AS400 sys=new AS400("192.168.111.211", "THARINDU", "GAYAN@123");            
            
                  int[] accounts = new int[5];
             
             AS400Array accountsarray = new AS400Array();
               
               
            ProgramParameter[] parmList1 = new ProgramParameter[1];
                ProgramParameter[] parmList2 = new ProgramParameter[1];
               
                parmList2[0] = new ProgramParameter(accountsarray.toBytes(accounts),5);  
               
             ProgramCall pgm = new ProgramCall(sys,"/QSYS.LIB/THALIB.LIB/ARRAYTEST.PGM",parmList2);
             
                 if (pgm.run()!=true) {
                System.out.println("executed");
            }else{
                   
                    AS400Text text = new AS400Text(30);
                     sys.disconnectService(AS400.COMMAND);
                   
            }
               
                AS400Message[] messageList = pgm.getMessageList();
                System.out.println(messageList.length + "TEst ok");
        
              sys.disconnectService(AS400.COMMAND);
              
            }catch(AS400SecurityException | ErrorCompletingRequestException | ObjectDoesNotExistException | IOException | InterruptedException e) {
                  System.out.println(e.toString());
      …
0
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hi am trying to add objects in my endevour am geting the above error
0
Greetings AS/400 Gurus...

I'm attempting to tackle the upgrade from V7R1 to V7R2...
I've downloaded and loaded my keys on WRKLIC...
I've downloaded the zipped files for my Entitled Software for the V7R2 update.
I used Dowload Director and I have all of the files on my PC...
They are all still zipped...

I need to know what to do next...
I want to use Image Catalogs to perform the install of the update to V7R2...
It's been so long since I've done this, I am struggling to remember the process of moving the objects into the image catalogs on the iSeries disk... I seem to recall that I need to get the stuff from my PC onto the IFS... I'm just not sure of the process...

Do I need to unzip the files...?
Do I need to put them in a specific place on the IFS...?

I have this link:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahc/scenarioprepareimagecatalog.htm
But I need to move the files to the IFS before I get to this step...

Any input will be appreciated...
0
I have a call program...example: CALL PGM (DELTE/RECV)...that I want to run in two different environments...Production (PROD2) and Test (TEST2).  My question is...how can I specifically run the program separately in both environments.  In other words, I want to run it in test, then run it in production.  Thank you in advance for your assistance!
0
I want to create user who is going to see all the user profile and group profiles but should not having access to changes or delete any thing on AS400 machine.

To achieve this i have created User having following permissions-

User class           - *USER
Special authority - *ALLOBJ
 
With this user, we can read all user profiles from IBMi machine, but due to *ALLOBJ, this user profile may have access to few other commands -

Perform Read only operations.
Add or Remove User to an Authorization List.
Revoke Object Authority.
Change own password i.e. Self password change.
I want restrict all these command to execute on IBMi machine.

My main requirement is to create a user having very minimum permissions means who can only read data from IBMi machine and do not have capability to change any thing.

If any one is having any idea about this please share.
0
I research the official document about commands RCVJRNE and QSNDDTAQ in the IBM knowledge center. But I just find the introduce about the parameter.
The example is just simple and doesn't contain that send data to data queue using RCVJRNE. So please help me.
The follow is the RPG file.
     DDQNAME           S             10A   INZ('DTAQTEST')
     DDQLIB            S             10A   INZ('xxxxxxxxx')
     DDQSNDLEN         S              5  0 INZ(100)
     DDATLEN           S              3  0 INZ(0)
     DDATKEY           S             10A
     DASYREQ           S             10A   INZ('*NO')
     DDATJRN           S             10A   INZ('*YES')
     DDQSNDDATA        S            100A
     D*
     DDQLEN            S              5  0
     DDQTYPE           S              1A
     D*
     C*************************************
     C* Main Logic
     C*************************************
     C*
     C     *ENTRY        PLIST
     C                   PARM                    DQSNDDATA
     C                   PARM                    DQTYPE
     C
     C                   CALL      'QSNDDTAQ'
     C                   PARM                    DQNAME
     C                   PARM                    DQLIB
     C                   PARM                    DQSNDLEN
     C                   PARM                    DQSNDDATA
     C                   PARM                    DATLEN
     C                   PARM                    DATKEY
     C                   PARM         

Open in new window

0
I am trying to login. I am using correct information.
0
I am working on a program in the CAPS (claim medical processing system) software.  It allows the user to enter claim information.  In the program claim information is written to files.  Before the claims entry screen is displayed, the program creates a backup of all the information for the patient.  This involves making copies of data in 5 different files in qtemp.  

If the user decides not to continue with the claim and backs out, the program removes all of the information in the 5 files for the patient being processed.  It then copies back the data that had been saved.  The problem with this is that on more than one occasion the claim entry screen ended before the information was copied back.

My manager has selected that we try commitment control.  But from what I have read this may not be the best choice.   Can anyone tell me if I am correct or can this be used?

Thank you
0
Hi All,

I want to know what my pool memory contains of and did DMPMEMINF.
I do that to know what can be improve in my program/file.
And here is the result (top nine) :
COUNT ( * ) POOL OBJNAME LIBNAME
7,492     5               ACTVTN PROC REF TBL
6,351     5               HSD
3,052     5               IWA
3,042     5               TERASPACE ADDRESS
2,199     5               SEIZE LOCK RANGE
1,103     5               QJOBMSGQ
803        5               WMHQ Data Queue Cache Temp Spc QTEMP
732        5               BPCA SPACE CREATED BY QDBOPEN
310        5               MAHANDLEMAPPER SEG

What is the meaning of that values in OBJNAME? I tried to google it but found nothing.


Thanks and Regards.
0
Hi all,

I would like to know if exists the possibility to make as a search in the screen of AS400 (all the screen, included AvPag (+)) and locate the cursor in the word searched.

I know that in HALC exist the option of SearchText and also the option of create a msgbox, and I would like to know if with that two options it possible create a tool/macro script for imitate the searcher of Excel (Ctrl+F)

Also, I would like to know the code for create a macro that find massively a lot of data and make an action with them, for example just copy.

Thank you in advance and kindest regards.
0
Cloud Class® Course: Microsoft Azure 2017
LVL 12
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

The users at our warehouse are telling me that when they print a "pick ticket" they get duplicates of some but not others. in the dspmsq qsysopr I can see the duplicate job number

 Writer 541275/QSPLJOB/SHIP2F started.          
 Writer 541275/QSPLJOB/SHIP2F ended normally.    

---JOB STARTS---
                                                                               
 Message ID . . . . . . :   CPF3382       Severity . . . . . . . :   00        
 Date sent  . . . . . . :   08/09/17      Time sent  . . . . . . :   05:32:28  
 Message type . . . . . :   Information                                        
 From . . . . . . . . . :   QSPLJOB       CCSID  . . . . . . . . :   65535      
                                                                               
 From job . . . . . . . . . . . :   SHIP2F                                      
   User . . . . . . . . . . . . :     QSPLJOB                                  
   Number . . . . . . . . . . . :     541275                                    
                                                                               
 From program . . . . . . . . . :   QSPWTRM1                                    
                                                                               
 To message queue . . . . . . . :   QSYSOPR                                    
   Library  . . . . . . . . . . :     QSYS                                      
                                              …
0
Hi all,

I created a macro script for AS400, basically with the comand "autECLSession.autECLPS.SendKeys "word" / "right" / etc...

This macro script runs at perfection but the error comes when there is a variance in the screen, because sometimes depending of the value introduced, it jumps a box with information (that I have to introduce Y/N (yes/no)), or just, sometimes, the values introduced are incorrected (because exceed the limit of characters available for a string), and the macro starts to fall and collapse the console.

My question is the following: there is any method that when occur an error in the macro, and appears the X in the status bar, the macro stops at that point?)

Kindest regards.
0
What do you find is the best solution to mask data for both SQL server and iseries DB2?
0
**************************************************************
        *                                                            *
        *            Licensed Materials - Property of IBM            *
        *                                                            *
        *     IBM(R) Sterling Connect:Direct(R) for UNIX 4.1.0.3     *
        *                   Build date: 20Jun2012                    *
        *                                                            *
        *  (C) Copyright IBM Corp. 1992, 2011 All Rights Reserved.   *
        *                                                            *
        **************************************************************

Direct>
XPAE003I  Return Code: 8  Feedback: 0
          :&KEYWD==:

XPAM001I  Return Code: 8  Feedback: 0
          Errors Parsing

Direct> Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.

       submit CAPM2AMS process SNODE=PQS1S
 step01 copy from (
                   file=/tmp/2017173.j4.01701.cctpepay
                   pnode
                   )
               to (
                   file=TEST.2017173.j4.01701.cctpepay
                   disp=new
                   snode
                   )
 step02 if (step01 == 0) then
           run task snode
           sysopts="TEST.PQS 2017173.j4.01701.cctpepay "
           run task (PGM=UNIX)
           sysopts="rm /tmp/2017173.j4.01701.cctpepay"
        else
 step03 run task …
0
Hi,

I have problem to create a loop,
I need a loop which a check of corectly of insertion label, if not back to start a loop and again show inputbox.

Can i detect in AS400  for specific row, col, presence of any sign?

my script:

[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_

sub subSub1_()

' etap 2 - deklaracja 21-10-9

   WaitInputApp
   autECLSession.autECLPS.SendKeys "[pf3]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[pf3]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[pf3]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "21"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[enter]"  
   WaitInputApp
   autECLSession.autECLPS.SendKeys "10"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[enter]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "9"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[enter]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "whhb777"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[enter]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "1"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[field+]"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "40"
   WaitInputApp
   autECLSession.autECLPS.SendKeys "[field+]"

   Dim copy
   copy = gety (5,32,3)
   WaitInputApp
   puttext 11,29,copy
0
Currently, we have version 5.2 of AS/400 which is no longer supported by IBM. Upgrading the system would be a lot of unwanted validation. I am looking into how to code a GS1-128 barcode in our current AS/400 system.

Our current barcode has the start function, text of numbers, mod-10 check digit, and a stop function and is in the code-128 font.

For a GS1-128 barcode I am trying to code (17)180801 . or some version of those six digits for YYMMDD. I know I need the start function, then FNC1, text, some check digit and then stop. For FNC1 I was using "8F" which I found in a table. Not sure if I can use the same start, stop, and check digits. When I did this I got a weird check digit and my barcode did not turn out correct.

Any insight or help with this problem would be greatly appreciated!

Thank you,

David
0

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
<
Monthly
>