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

Need help with setting up and configuring SFTP on V7M3 IBM i. I have no working knowledge of SFTP but tons of experience using FTP. Appreciate any ides folks! Phil
0
Become a CompTIA Certified Healthcare IT Tech
LVL 13
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

I have a CL that is using QP2SHELL2 to call an API url and I'm getting error: CPFB9C0 (PASE for i program not found or in use. Path name is......)  .  I have another CL program that works fine and does close the same thing.  What am I missing.

Thanks Experts!
0
I have multiple search screen which I'm rewriting from 36. (yuck-very old)  I'm adding fields which allow the user to filter the information. Everything is working great, but I figure there has to be a better way.
Currently when the filter criteria changes I declare a the cursor dependent on the criteria selected and reload an array. (I could load the date range only and the selectively load the subfile, however doing this way they may not see all the records because it could exceed the 9999 without all criteria.)  SQL is fast and works great.  It is the cursor definition I have questions on.  Please see attached sample code.  Thank You!
Cursor-definition.docx
0
I want to calculate the number of days between days, inclusive of the first date. I want the number of day gone.  So, when the trip departs and returns on the same date I want 1 day.  Should be easy but I keep getting errors. Running interactively.  dates are stored as 8s 0.   Sample code:

select trknbr,                                              
     ((Days(date(rtndte))-Days(date(lvedte))) + 1) as dys,  
       lvedte,rtndte                                        
  from delivdetl                                                
  where lvedte=20190730

results example:
   123456  +++++++++++++++ 20190730  20190730

Thank You for you assistance!!
Lynn
0
I have spool files that I'm trying to copy to a physical file and then have them emailed or at least put out to a network share.  My issue is that there are multiple days with the same filenames for each set of files created for the day.  Please see the attached picture.  I tried the cpysplf; however, it finds there being multiple jobs and cannot distinguish between the different files.  I'd want the job to run each day, in the morning and to pull the last reports.  Any help would be appreciated.  Spool file review.
0
I am attempting to add additional media to my BRMS configuration. I am using the following command:

ADDMEDBRM VOL(A01001) MEDCLS(ULTRIUM5) VOLCNT(15) INZ(*YES) TEXT('Backs up all user data') DEV(TAPDDBKP) NXTVOLMSG(*NO) LOC(TAPDDBKP)

Where TAPDDBKP is our Data Domain that we are backing up to.

When I run this, I get the following error:  Command ended due to error

Upon further investigation, I am getting the error: Cartridge A01001 not found

In the help text for this, it shows you can run a ADDTAPCTG command to add cartridges.  If I attempt to do this (ADDTAPCTG DEV(TAPDDBKP) CTG(A01001)), I get the following error: Cartridge A01001 not found

I am not sure what I need to do. Any help would be much appreciated!
0
How to do a client authentification by dedicated RPGLE, not for all sessions of a client.
(ACS Connection to iSeries is used). Maybe with usage of DCM certificate ?
0
Hi All,

I have a logical file:  MFWOL100 that sits in production library LOGICLIB and refers back to the physical file MFWOP100 in FLNFILPRD.  I want to copy that logical file and use it in my test environment.  Our test environment is located in the FLNFILTST library and that is also where the MFWOP100 file is located.  The MFWOP100 file is multimember, with M800, M810, M820, M830, and M840.  

What is the best way of copying that logical file and changing the source table so that I can use it in my test environment?  

I've tried this a couple of different ways and I appear to be going around in circles.

Any help would be greatly appreciated.

-Anthony
0
Hi.  Format of Db2 SQL update statements over joined tables is confusing but I think I have a handle on it.  I'm hoping someone can verify my code before I make an update in my ERP system.    I'm only updating 1 record to start but even so, I want to make sure I have the statement formatted correctly before I even do that.  

Update-ITCLS-a-and-set-to-value-of-.docx  I've attached a partial output of a select statement over my joined tables:  ITEMBL a and ITMRVA b.  There is a 1 - many relationship from table b to table a joined on the ITNBR (multiple House records for each ITNBR record in table b).  Both tables include a field called ITCLS that is manually updated in table b but is not getting updated in table a.  My task is to copy value of table b to table a where the ITNBR matches, regardless of house designation and where a.ITCLS <> b.ITCLS.    (about 2000 records out of 100k or so..

I think this code might do the trick but I'm not 100% sure...  After a test I'd substitute the single itnbr for "AND a.ITNBR = b.ITNBR"

 
UPDATE amflibx.itembl as a
  SET itcls = 
    (SELECT b.itcls 
        FROM amflibx.itmrva b                                    
        JOIN amflibx.itembl a ON a.itnbr = b.itnbr              
        WHERE a.itcls <> b.itcls AND b.itnbr = 'AN02.5')
 Where exists
    (select * 
        FROM amflibx.itmrva b                                    
        JOIN amflibx.itembl a ON a.itnbr = b.itnbr              
        WHERE a.itcls <> b.itcls AND b.itnbr = 'AN02.5')  

Open in new window

0
Hi Experts,

From a Web-service I get a return-value, that should be Base64 encoded.
While debugging, I see that it doesn't look like base64, I assume that it is base64 but in ASCII format,
When I look into the logging, I see base 64 data.

If it is ASCII, how do I write that to an IFS-file using the open(::::)
I tried a lot of oFlags and modes and some CCSID's, but can't find the right comination

Current open function:
open(%trim(B64FileName) : O_RDWR + O_CREAT + O_TRUNC + O_CCSID + O_TEXTDATA : S_IRWXU + S_IRWXG + S_IRWXO : 819);
close(fd);
open(%trim(B64FileName):O_RDWR+O_TEXTDATA: S_IRWXU + S_IRWXG + S_IRWXO);


Debug result looks like :
■&àã■■■■■■■■■■■?¦■■■■■■■è`
?ÀÁ■■íËÁ+?>Á■■■&/ÅÁ</`?ÍÈ■
■■■■■&Ê?ÀÍÄÁÊ■■&ÀÃäÊÁ/È?Ê■Î
0
Fundamentals of JavaScript
LVL 13
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Hi,

iSeries: I have a screen (pgm a) which calls a window (pgm b) then it call a second window for a search (pgm c) .  When pgm c returns to pgm b, the backgroup and window lines are gone. I've included screen prints.  

Any help is much appreciated.
Lynn

window-and-back-ground-disappear.docx
0
How to ESCAPE RPG-program in error-case ?

RPG calls some API. if error happens in API-call, RPG program loops,
because of parm-length error.

How to use SDS to avoid looping (escape, without MSG, only leave RPG-pgm) ?
For example :

 I*                                                                
 I           SDS                                                  
 I                                     *PROGRAM PGNAME            
 I                                     *STATUS  PSTAT              
 I                                      254 263 USER              
                                                               
  *                                                                
0273.00      C                     MOVEL'MSGJOB'  SPC    10                  
0274.00      C                     MOVEL'TSITOOL' SPCLIB 10                  
0275.00      C                     MOVEL'*ALL '   JUSER                      
0276.00      C                     MOVEL'*ALL '   JNAME                      
0277.00      C                     MOVEL'*ALL '   JNUM                        
0278.00      C                     MOVELSPC       USRSPC                      
0279.00      C                     MOVE SPCLIB    USRSPC 20                  
0280.00      C                     Z-ADD2         ANZK                        
0281.00      C                     Z-ADD0101      K1                          
0282.00      C                     Z-ADD1906      K2     …
0
Hi All, I need to create a lf over a pf that has 5 members. When I go to execute the creation, I get a DDS error relating to the severity level indicated. I feel like I'm doing something fundimentally wrong creating the file. Can someone give me the steps to create a LF. do I need to create a member first because that's where I feel like I'm getting hung up.

Thanks for your help in advance.

-Anthony
0
Hi Experts,

We have on our IBM iSeries Server (as/400), some https: connections, that make use of the default kesystore:
/QIBM/USERDATA/ICSS/CERT/SERVER/DEFAULT.KDB

Now we have several environments Development, test1, test2, acceptation, production1 etc.
Is is advisable to make a keystore for each environment with each their own authorization?)
0
Hi Experts,

I have Generate the sources for a webservice with the default string length of 128.
In the service there is one element that have  to contain  base64 data so 128 pos it to small,
So I like to set the the size of only 1 field to 16384 (or even more).

Therefore I tried to copy the  xsd_string definition to a  xsd_Lstring definition and changed the value entry to a larger number.
After that I changes all required likeds(xsd_string) into xsd_Lstring  (I think i did, but probably I missed one or more)
Then recreated the Service-program.
I understand what is wrong, but can't find where to change that.

Whatever I try I keep the error:

Message RNQ0202
The call to stub_op_M1 ended in error (C G D F).
Cause . . . . . :   RPG procedure TRNS001R in program KWNPGM61/TRNS001R at    
  statement 3456 called program or procedure stub_op_M1, which ended in error.
  If the name is *N, the call was a bound call by procedure pointer.          
Recovery  . . . :   Check the job log for more information on the cause of the
  error and contact the person responsible for program maintenance.          

more info (f10)

Message: RNX0115
Message . . . . :   Length of varying length variable is out of range.      
Cause . . . . . :   The length of a varying length character or DBCS variable
  is less than 0 or greater than its declared maximum length in RPG procedure
  XSD_STRING in program KWNPGM61/TRANSUS01.                                  
Recovery  . .…
0
Hi, I was wondering if there was a command on the AS/400 where I can view all the options/menus that an individual has access to.  I need to ensure that another user that has already been setup, has the same access as another user.  I would just recopy the profile over; however, this user has already started to do work and I don't want to screw things up for them.

Any information would be appreciated.

Thanks.
0
Hello Experts

A print device was deleted by accident and was working.  Now I can't figure how to set up the print device Okidata Dot Matrix LAN printer on the AS/400 again.  

Any help would be appreciated.  Thanks!
0
Hi

I would like to prevent AS400 users from deleting THEIR spool file entries.

how can I do this?

Gerry
0
When I attempt to log in to my iSeries server via Putty (Port 22) - I am connected to the server, but when I attempt to log in, I get "Access Denied"

I compared my SSHD_CONFIG to other systems and everything appears to be the same.

I verified that other users get the same thing - so this is not related to any specific user...

Any assistance would be much appreciated.
0
PMI ACP® Project Management
LVL 13
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Hello,

My default printer has a problem right now and I am moving the files from different users to a remote output queue.

This remote output queue stop or delay in SND status and suddenly start to print this take a long time.

The remote printer is a Printronix p7010 and use LP+.

I have attached the wrkoutd and the message ids taken from wrkjob out(test).

Please I need to know where is the problem and how can I fix it.

Thank you very much for your time.
CPC2206-message-id.pdf
TCP3600-message-id.pdf
WRKOUTD.pdf
0
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:

CHGUSRPRF USRPRF(USERPROFILE) LMTCPB(*YES)

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

SBMJOB CMD(CHGUSRPRF USRPRF(USERPROFILE) LMTCPB(*YES)) JOB(SFTPCMD) USER(SUPERUSER)

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)

SBMJOB CMD(QSH CMD('ssh -T sftpuser@servername ''system "SBMJOB CMD(CHGUSRPRF USRPRF(USERPROFILE) LMTCPB(*YES)) JOB(SFTPCMD) USER(SUPERUSER)" ''')) JOB(SFTPJOB) USER(SFTPUSER)

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.
0
Does anyone know how to display the current temperature for an IBM i server?
0
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.

How-to-send-a-RatingRequest-Example-.txt

RXS_TransmitDS_t.txt
0
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('10.1.1.1') PORT(*SECURE)  

  Connecting to remote host 10.1.1.1 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).                            …
0
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.

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