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

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
Exploring ASP.NET Core: Fundamentals
LVL 12
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

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

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
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
Needing recommendations for hand held scanners that I can do 5250 emulation.  I am doing a scanning project for a warehouse and we have an AS400/iSeries.  The scanner needs to be able to run 5250 emulation.  I have used the Motorola MC9190 scanners in the past.  They work very well, but are very expensive.  There are other options for those like refurbed ones.  Also there is the MC9090 scanner.   Any suggestion would be appreciated.
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 have been tasked with creating a list of possible combinations for standard parts.  

I have a list of standard parts that look something like this:

10.200.12??.000
15.234.1324.0??
81.43234.??00

I also have a list of color codes that are all two digits:
11
QQ
AH

I am wondering if it is possible in SQL and ultimately in a CL program on our i series to generate a list of all possible final part combinations and put them in a table?

In this example:
10.200.1211.000
15.234.1324.011
81.43234.1100
10.200.12QQ.000
15.234.1324.0QQ
81.43234.QQ00
10.200.12AH.000
15.234.1324.0AH
81.43234.AH00

I don't have any experience with loops in SQL and am having trouble making sense of the examples I have found.

I can do this in Visual Basic or other languages but the goal is to have it on a schedule and automated on our job scheduler.  

Any guidance is appreciated.
0
We have an odd issue on one of our IBM i servers. It appears that every Thursday at 5:00 PM - our hand held devices lose connectivity to our IBM i server.  It looks like our services go up and down for about 20 minutes and then stabilize.  If I look at QHST - I see that there are a lot of devices disconnecting - but i don't see the IBM i actually being unresponsive - but I don't know that for sure.  

I was wondering if there was any detailed logs somewhere related to TCP/IP that I could look to verify if the server actually lost connectivity during that timeframe or if OTHER devices connected to it lost the connectivity.  I have included a couple of snapshots of the logs...to show what I am seeing around that 17:00 PM timeframe.

LIT_Log_1.gifLIT_Log_2.gifLIT_Log_3.gif
0
Hi All,

I'm assisting a friend in changing the field length in an existing physical file on an AS/400,iSeries.  We are trying to understand two things:

1. What is the best way of going about this.

2. What is the best way of updating all supporting programs which use the PF or LF.  

Attached is a document we received from a guy who responded to our post on an IBM website.  This has been helpful; however, there are hundreds of programs that reference that PF that we are changing.  

If anyone can shed some light on a more effective way of making these changes, it would be greatly appreciated.

Thank you.

-Anthony
0
We would like to set up FTPS (SSL FTP) between our mainframe and IBM i (V7R1 currently). Our mainframe system programmer sent me a certificate (MAINFRAME.CER).  I went into the digital certificate manager on our IBM i and imported the certificate and then added it to the "access" list for FTP.

Does anyone know what else is needed to be able to do FTPS between the IBM i and Mainframe?

I appreciate any help
0
Hi All,

I would like to include the PNG file or EPS file via AFPRSC to generate the PDF.
Is it possible. If it possible, please send me the sample command with PNG JPG.

Or do you have any other way to include the PNG or EPS file in Printer file to generate the PDF?
Note: I'm using *IPDS printer configuration to print the JPEG via AFPRSC to generate the PDF and it's working fine.

AFPRSC('IMG1.JPG' *JFIF 0.0 0.0 (*PATH '/FOLDER1/IMG/'))
0
JPG in AFPRSC with 23 works fine. But PNG with 65 is not printing.

AFPRSC('QRC.PNG' 65 - 
0.0 0.0 (*PATH '/JP/STAT'))

Open in new window


Need help on how to get it work? or is 65 the correct component ID for PNG?
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
>