[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

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!

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
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

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

After creating several tables with SQL (because of the naming I have to use), I have in my Data Library files with names as CUST_00001 and PROD_00001 (as expected),
The field names in the files from DB2 site, are numbered CDTA_00001, CDTA_00002 etc.  (also as expected),

I prefer to have the SQL field names in my SQLRPGLE program, so that I can create a readable (maintainable) program, is there a way to manage that?

Thanks
0
Fundamentals of JavaScript
LVL 12
Fundamentals of JavaScript

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

We have very large Journal receiver (about 61 Gig) on the system journal QAUDJRN. We will be swapping the receiver and changing it to be managed by the system, but I am wondering how long the CHGJRN command will take with a receiver that is so large.
Does anybody have any experience of changing journal receivers? and know how much time the process usually takes?
0
I am wondering if there is a way to view all the jobs that have ran from a particular JOBQ for the past 24 hours (or the past xx hours)?
0
I have an application AS400/iSeries application that i am using to scan receipts into the warehouse.
The scanner is a Zebra TC20 scanner. (droid based)  I am using the Mochasoft emulation.  Pretty vanilla.

When I scan into a field, I would like the program to advance to the next field to be ready to scan.   I am using the DDS keyword Check(ER) on the fields.  but that doesn't seem to make a difference.  If I scan data that is the exact same size as the field, then it does advance.  But the part# is like 10 long, but I am only scanning 5 characters.  It needs to jump down to the qty, but doesn't.  It will if you press tab on the device.
Any way to make it do this?  this is my program.
SN1000R1 SCAN FOAM RECEIPTS  
                             
EMP#.....:                  
PO/Schdle:                  
Part#....:                  
Qty Recvd:                  
                             
LAST SCANNED:    

Any ideas?
0
Hi Experts,

In a CL I collect information about *.CSV files in a specific IFS map.  /mypath/*.[Cc][Ss][Vv]
The output is redirected to an existing file /QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR

QSH CMD('find /mypath/*.[Cc][Ss][Vv] > /QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYFILE.MBR')  
On our developementserver it worked fine.

Now we transfered the software to the testenvironment on the production server
find /mypath/*.[Cc][Ss][Vv] > /QSYS.LIB/TESTLIB.LIB/MYFILE.FILE/MYFILE.MBR  
And it still works as expected.

Once we tried it on the Production environment, it stop working, (the  /PRODLIB is located on ASP1).
so I added  /IASP1 to the path,
find /mypath/*.[Cc][Ss][Vv] > /IASP1/QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR  
and still get the error:
qsh: 001-0055 Error found creating file /IASP1/QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR. No such path or directory.
0
Hi Expert(s),

Is there a way to write Data (eventually with SQL)  from the AS400-DB2 to a MySQL-DB or Oracle?
0
HI All,

I've been trying to figure out why there would be such a difference in doing an Insert Into query to my local iSeries vs my remote iSeries through MS Access.  I have a simple query that has about 3800 rows of data and 4 columns.  There are keyed values in both the table on the iseries and in access.  When I do the Insert Into query to the iSeries in my building, it is super fast, just as quick as doing a file transfer.  When I do the same query to my remote iSeries, it takes super long and appears to do it in junks.  Both ODBC configurations are the same and I'm puzzled as to what is going on.  My current work around is to do a file transfer outside of Access, but I'd really like to just put the data right into the table through Access without opening another table.  

Has anyone dealt with this before?  Any suggestions on things I can try or look at to make the data transfer quicker through Access?
0
IBMi / AS400  Hello Experts, I have a need to pass a URL address to the internet that contains zip codes by radius and return the results.  I have found a pretty good site that I can use to pass this URL address and the results are in a CSV format.   How do I pass the URL and save the results in a DB2 file?
0
Started logon on iSeries with FTP.  for getting:   PF file (character fields) to WIN-PC, as txt-file.

File which arrives at PC is no readable textfile.
What are possible reasons : Codepage, Charakterset ... ?

FTP command:  get  filexxxx.file  filexxx.txt

Result:
㌱〱ㄷ〸㌳㈴吰䥓䅓䕖†儠单䉒䵒†⨠䥆䕌†匠噁⁆††〠⚜寭㼓畱牳牢潦⁲汦獡捨灯⁹敲瑳牯⁥††††††††††〰〱〳ㄵㄸ〰㔹吶䥓䕓⁃†ㄠ㔰㔱㠱〱㌲㈲䅓䱖䉉††萃靮ޕ〰楓⹣䐭瑡楥†††

or

??????????Å????Å???Å???ÅÅ???????????????????ÅÅÅÅÅÅÅÅÅÅ???????????Å??????????ÅÅ?????????ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ??????????ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ?ÅÅÅÅÅÅÅÅÅÅÅ?????????????Å????Å?ÅÅÅÅÅÅÅÅÅÅÅÅ????????Å?????????'ÅÅÅ????ÅÅÅÅÅÅ??ÅÅÅÅÅÅÅÅÅÅÅ???ÅÅ ??ñ

Hello,
thanks a lot for detailed Information about FTP so far.
Problem seems System (LPAR) dependend. I tested on two different LPAR: one was OK, on the other LPAR notOK (see above) with the same FTP (Log below)

OK FTP result:
1010818102824TSISAVE   QUSRBRM   *FILE   SAVF      0_c€à_ qusrbrm for flashcopy restore                     001030518100956

Both LPAR have the same, following definitions:
QSYSVAL QCCSID : 65535  
PF CCSID                : 37

PF field is  :
 (wanted only to get field ODDDAT from QUSRBRM.file,  for Monitoring reasons on WIN-PC. Ignored other fields in the record .. . . . )
ODDDAT     CHAR            6       6         2        Both
      Coded Character Set Identifier  . . . . . :     37      

QUSRBRM.file was created by :
     DSPOBJD OBJ(MYLIB/QUSRBRM) OBJTYPE(*FILE) OUTPUT(*OUTFILE) -
0
HI,

I have a Model 9406-170 with OS: V4R4M0

I can login to this system via FTP and navigate to the AS400 library (MFG.PMS) that I want to download files from. I have verified through green screen that the files PMCR06.PGM and PMCR06CL.PGM exist in this library.

My FTP "pwd" command output:
257 "MFG.PMS" is current library

My FTP "ascii" command output:
200 Representation type is ASCII nonprint.

My FTP "get PMCR06.PGM" OR "get PMCR06" command output:
550 File PMCR06 in library MFG.PMS not found.  
550 File PMCR06.PGM in library MFG.PMS not found.

So I attempted FTP command "dir" and get this output:
200 PORT subcommand request successful.
126 Member *ALL not found in file *ALL in library MFG.PMS.
250 List Completed.

NOTE: I ultimately want to do the following via FTP...
1) Start FTP session.
2) Set FTP session to ASCII.
3) Set FTP session to not prompt.
4) Navigate to an AS400 library.
5) Download all files in the library via FTP command mget *
Repeat starting at step 4.

I'm new to the AS400 but not FTP.  Anyone have any tips?  

Thanks!
0
Become a Certified Penetration Testing Engineer
LVL 12
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

One of our developers is attempting to do an "Insert" into a view.  They are connecting in via ODBC.

I gave the user profile *ALL authority to the View but I am getting the error:

Message: [SQL0551] Not authorized to object VSTOWERINT in DCTEST type *FILE. Cause . . . . . :   An operation was attempted on object VSTOWERINT in DCTEST type *FILE.  This operation cannot be performed without the required authority. Recovery  . . . :   Obtain the required authority from either the security officer, the object owner, or a user that is authorized to the QIBM_DB_SECADM function. If you are not authorized to a logical file, obtain the authority to the based-on files of the logical file. Try the operation again.   Processing ended because the highlighted statement did not complete successfully

I figured I needed to give the user access to the file that the view was based on...but I gave the user *ALL access to this file too and we are still getting the same error.

Does anyone have any insight into why we would be getting this error - even though we gave the user *ALL access?

Thanks in advance
0
Hi,

I need to make a couple iSeries green screens available on the Web (asap). They need to be mobile friendly as well.  I have experience with SQL, but no web development. Can anyone recommend best book/articles as a starting point. Any direction or tips would be greatly appreciated!

As we will be moving forward with other screens, I need to acquire the skills instead of outsourcing.

Thank You,
Lynn
0
I need to write a screen scraping program for an IBM 5250 session, using VB.Net and IBM iAccess Client Solution. I have not been able to find any information on this. Can anyone help me with a few links to the needed DLLs and code examples for this?
0
Hi Good morning

I have to install IBM iSeries Client Access Emulator for Windows 10. Please provide the installation details.

Thanks,
Gayathri
0
I need a clp that will execute an FTP from 1 iseries to another iseries.  They are both on the same network with unique IP addresses.
0
Greetings

   When we see values on greenscreen from a AS400 programs, there are needs to download massive data.

   Sometimes we see a number in screen but to avoid going from screen to screen to check multiple values, we know all those values are in a table

   Do you know how to extract the "table name" to download massive data in a SQL query from a number you see in the screen?

   Picture attached to explain better.

Thank in advance
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
>