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 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
Become a Microsoft Certified Solutions Expert
LVL 13
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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
CompTIA Security+
LVL 13
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

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
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?
0
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

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

Thanks
0
Introduction to R
LVL 13
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

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
0
. 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
0
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

TLS-Version.PNG
0
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 ?

disconnect-instead-closing.PNG
0
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              
            END                      
            END                      

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.

Thanks.

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