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

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
Python 3 Fundamentals
LVL 12
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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
I am building a new LPAR and attempting to import a Self-Signed certificate that we have loaded on our other servers.  

I am attempting to import both a CA and a self-signed cert

I am able to import the CA - but I am getting an error when attempting to import the "server/client" certificate.

The steps I am following are:

a.      Select the *SYSTEM certificate store
b.      Click on Manage Certificates
c.      Import certificate
d.      Certificate Authority
e.      Upload the file: /cert/ibmirootca.cer
f.      Name the certificate: IBMIROOTCA

2.      Import the Self-signed certificate
a.      Import Certificate
b.      Server or Client
c.      Upload the file: /cert/ibmissc.cer
d.      Password for self-signed certificate: <cert password>
e.      Name the certificate: IBMISSC

It is at this point that I get the following error:

Certificate Error
Any ideas on this?
0
Hi Experts,

In a RPG program I use /COPY with qualified names and unqualified names.
e.g.
/Copy MyFile1.rpgleinc
/Copy MyFile2.rpgleinc
/Copy /Standard/Version9/Rel5/gplcalc.rpgleinc

Using the CRTRPGMOD parameter INCDIR('/Home/user/myPrograms/includes'), it will find the right include-files and the module is created without errors.
When I try to create a program from the module I get the following error:

Message-ID . . . . . . :   CPD5D02      
                                                                             
Message . . . . :   Definition not found for symbol   'getSubSetCustomer'                        

Cause . . . . . :   No definition was found for reference                    
  getSubSetCustomer in *MODULE object MyProg2 in library MYLIB.
  The definition either does not exist or is not of the same data or procedure
  type as the reference.                                                      
Recovery  . . . :   Try the Create Program (CRTPGM) command again, supplying  
  an object that contains a definition for symbol  getSubSetCustomer


Without the INCDIR() and full qualified names, the program is working.

Because of copy/move and maintenance, I prefer to use the unqualified name for most of the include files, is that possible?
0
Hi Everyone,

I'd just like to confirm a line of code that I'm modifying in an RPG program...

This is what the code currently is:

 MBFTPT    IFEQ 'P'      
 MBSGNP    IFNE 'L'      
 MBSS#     CHAINLABGOOD  

Open in new window


I need to add another line for MBSGNP that if it is not equal 'O' as well.  But I'm not completely confident on the syntax of the "or not equal to part".   Can someone assist me with this.

Thanks.
0
Hi Experts,

I did create a webservice client form an existing wsdl, using the IBM "wsdl2rpg.sh" tool.
"/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2rpg.sh"
But the result was to complex to understand what I had to do to use it.
So I create an own service wit only 2 values in and 1 value out.
But still I have no clue where to start.

The result of the wsdl2rpg is:
14 C-sources,
1 Cl-source,
2 Rpgle-sources,
3 Rpgleinc-sources

I understand that de CL is compiling the C-sources and create the service program.
But I need some info about how to use the result of the wsdl2rpg generation.


I used the attached WSDL for this test.
(expected output value is Input1 + input2)
MyWs.wsdl
0
How do you copy the records in a member file into a physical file?  I need to export the records in to the member data to an excel file for further manipulation...
0
Is there a way to see all jobs included under the STATFS command? Besides the Root directory?
0
AS/400, iseries, System/i help please.  I renamed a library or something and now I cannot log in, with any user id.  It flashes a job log, then gives the sign on back.    I was doing some testing and renamed some test libs and what I did should not have affected me regular user id's.   Any way to bring it up in STRSST mode or something, so I can see the logs and make changes?  I have tried QSECOFR and all the user id's that I know.
0
Bootstrap 4: Exploring New Features
LVL 12
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Good Morning,

I'm using SPLF2EMAIL (which converts to a PDF and uses SNDDST) to send documents to our users. This work well, but the subject line get changed to the 'document.txt' id instead of the message (verbiage description) sent.  The '*.TXT' is the DOC() value used by SNDDST command. The verbiage I send gets put in the msg() field on the SNDDST command and is the first line in email.  Is there a way to change this to send a more useful subject line instead of the document ID. (preferably the verbiage currently be sent in MSG()).

Thank You in advance.
Lynn

Sorry, I should have edited this question and not deleted. It is sending the verbiage after the '*.txt' on the description line in gmail when I view via the inbox. However, on my phone it only shows the *.txt.  I was deleting because it is not as clear a question. But decided to re-post because I'm still not sure how to get the verbiage to be the main subject line, or if I can.

Again... Thanks
0
Hello,
Problem is : iSeries interactive sessions disconnect unexpected.

With Joblog error-msg CPF2479    "Call stack entry not found",
before disconnect session with CPF5140.

My question is: may be a dependency,  CPF5140 caused by CPF2479 ?
I am asking this, because disconnection may also  be caused  by a betwork failure.
(But nearly in all disconnected Jobs, there are many CPF2479 before . . . )
0
iSeries menu question - Can I disable the functions keys? I don't want F3/F12 to exit the menu. I want an option selection to be the only way.

Thanks in advance!
Lynn
0
Hi Experts!

I am running into an error when using CPYFRMIMPF and numerics.    When I run the CPYFRMIMPF command I get these errors..  The copy did not complete for reason code 9. When I have the DDS fields all alpha numeric it works.

This is my CPYFRMIMPF code:

0049.00              CPYFRMIMPF FROMSTMF('/ZIP/ZIPFILE.CSV') +              
0050.00                           TOFILE(*CURLIB/&EDTF) MBROPT(*REPLACE) +  
0051.00                           RCDDLM(*LF) STRDLM(*NONE) +              
0052.00                           RMVBLANK(*TRAILING) RPLNULLVAL(*FLDDFT) +
0052.01                           RMVCOLNAM(*YES)                          
 
This is a sample of the data from the ZIPFILE.CSV

zip_code,distance,city,state
15090,99.162,"Wexford","PA"
15084,99.649,"Tarentum","PA"
15006,98.913,"Bairdford","PA"
15015,98.329,"Bradfordwoods","PA"

This is my DDS:

0001.00 0008 A          R ZIPCREC                   TEXT('ZIP RADIUS')
0002.00 0000 A            ZIP              5A         COLHDG('ZIP CODE')
0003.00 0000 A            ZDIST          4P 3     COLHDG('DISTANCE')
0004.00 0000 A            ZCITY        30A         COLHDG('CITY')    
0005.00 0000 A            ZSTATE       4A         COLHDG('STATE')  

Thanks for your help!!
0
How to get IFS details (directory inventory, tree . . .) from QUSRBRM file QA1ALI2
without BRMS Report functioin, directly from QA1ALI2 (convert ASCII?) ?

Found solution :
Directory pathes are stored in BRMS in file QA1A1DI2,
field DINAME (to convert with function varchar by query ...).
0
We are getting the following error, "Resource limit type 14 exceeded with reason code 542".  When looking at type 14, it says, "If this is error type 14, reduce the number of allocated descriptors with the DEALLOCATE DESCRIPTOR statement."

I was wondering if anyone know how we could monitor our program for how many descriptors are currently being used?

I found we could use the following statement to allocate descriptors, "EXEC SQL ALLOCATE DESCRIPTOR 'NEWDA' WITH MAX 20" - but if we don't know how many we currently have - seems like this isn't going to do much for us.

Any ideas?
QPJOBLOG_1429_QPRTJOB_RHO_832377_S21.txt
0
Hi experts,

I have some pointer questions for some time, but now I finally want to know. :-)

Why Can't I use :
    callp MyProgram(%addr(Var1:%addr(Var2))
This give a compile error.

Why Can't I use a pointer in my pi parameter directly?
a Data-structure based on a incoming parameter pointer will show only '*****' values.
(now I have to base it an an other pointer, and fill that one with the parameter value).

I did read the Scott version of "messing around with pointers", but I cant find the answer there :-)
0
Is it possible to retrieve a listing from audit journals  on the IBM i, of all user's that answer a 'spool' file message?
0
I am trying to connect to MS SQL Server 2016 from an IBM-i (V7R3) to populate a table used as a data source for a drop down selector (LaserFiche Forms)
I am currently running a C# program on a 3rd box, calling an IBM-i program to create the data on the IBM-i, then create a collection in C# from that data, and finally running a set of SQL statements on the MS SQL Server to re-populate the data there.
I'd really like to eliminate this middle tier and go straight from the IBM-i to SQL Server.
I've tried Scott Klement's JDBCR4 but I can' t get it to connect to the SQL Server. I'm using the MS JDBC driver - sqljdbc42.jar file. I've tried using my domain login and also tried to create an ID in the SQL instance but neither of those worked.
Any help/examples would be appreciated.
0
Why Diversity in Tech Matters
LVL 12
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

I was sending XML in SOAP envelope to a web consuming server here at Lone Star. The Web consuming service has now switched from XML to JSON. Does the SOAP envelope change? If so in what way? I'm attaching the actual output to the Web Service. Using Krengeltech's RPG-XML to generate the XML data formatted and wrapping it in the SOAP envelope. Krengeltech also has a JSON api to perform the data mapping in JSON instead of XML. I need help creating the 'wrapped' soap statements
0
Sterling Connect Direct on i5 :
Version 3.5 should be ugraded to Version 3.8.
Has sombody  experience with parallel installation of 3.8, because there is no upgrade plan provided by IBM  (3.5 is too old).
0
I'm trying to install cURL on our IBM I v.7.2 and have downloaded the AIX binary to the IFS root directory using Navigator.  I have run the command CALL QP2TERM which opens the PASE command line, CD to directory :  Mycurl\opt\freeware\bin\   which has listed curl , curl_32 and curl_64.  when I run  'curl' from the command line I get this error:
 > curl                                                                                  
   exec(): 0509-036 Cannot load program curl_64 because of the following errors:        
           0509-150   Dependent module libcurl.a(libcurl.so.4) could not be loaded.      
           0509-022 Cannot load module libcurl.a(libcurl.so.4).                          
           0509-026 System error: A file or directory in the path name does not exist.  

I can not find any simple steps on installing cURL on the IBM I.  Please help, thanks!       I downloaded cURL from:  https://curl.haxx.se/download.html   AIX
0
Convert 8 digit numerical field date in CCYYMMDD format to MMDDCCYY format in free form rpg.

This little trick doesn't seem to work in free format.
*DATE         MULT      10000.0001    XXDATE            8 0


how can i convert 20180501 to 05012018 on one line of code?
0
RPG code to extract first and last name from an "entire name" field.

I have a field that has clients' entire name.   Last name is always first, followed by a space.  I need to get all the characters until a space is found and put those chars into a last name field. Then, grab all the chars after the space and put those in the first name.


NAME
SMITH TED B.
SMITH RANDY
SMITH TOMMY R JR
JONES BRETT

to

LASTNAMEFLD                 FIRSTNAMEFLD
SMITH                                TED B.
SMITH                                RANDY
SMITH                                TOMMY R JR
JONES                                 BRETT
0
Hi Experts,

I have some SQLRPGLE problems with reading a tabel (with null capable fields)
The program reads a record in a DS , change 2 fields and write it to a remote (identical) table.

But I have to add a null "check field" per field
exec sql fetch next from cIMPH INTO
 :DS_REFERENCE       :ISNUL1,          
 :DS_CONTEXT         :ISNUL2,          
 :DS_OBJECT_TYPE     :ISNUL3;

In this example it's not a problem, but I need to do this for a file with round 100 fields.
So I prefer to use the SQL

exec sql fetch next from cIMPH INTO :DS;

On top of that, if I use the null-check field, the original field contains a space or a zero.
the remote table expect null values.

How can I solve this?
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
>