Retrieving file's keys with SQL, having to use DSPFD
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
6d ago
In my last post I wrote about how to list a file's key fields using the file QADBKATR to retrieve the key fields' information from. I mentioned that there may be times that you are not authorized to use the QADBKATR file. If you are not authorized how else can you get the key fields? And present them as I did in the previous example? I have to fall back and use the Display File Description command, DSPFD, using the Access Path value in the "Type of information" parameter: DSPFD FILE(MYLIB/TESTFILE) TYPE(*ACCPTH) Read more ..read more
Visit website
New IBM Power 10 model for AI
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1w ago
On Tuesday, May 7 2024, IBM announced a new model IBM Power 10, S1012, which caught my eye. It is smaller than the other IBM Power rack mounted servers, and it also comes in a cool looking tower version too. The following statements in the announcement caught my eye: "This 1-socket, half-wide Power10 processor-based system delivers up to 3X more performance per core versus Power S812"   "delivers the lowest entry price point in the Power port[f]olio to run core workloads for small and medium-sized organizations"   "provides clients the flexibility to run AI inferencing workloads in ..read more
Visit website
Retrieving file's keys with SQL
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1w ago
I was asked how I could present the following information in an "easy to use" manner for all of the "files" in a library: Library name File name, or Table, Index, etc. name Type of file When it was last used File's key fields The easiest way to get this information is using SQL. The first three pieces of information can be retrieved from the SYSFILES View. The last used information can come from the OBJECT_STATISTICS Table function. Getting the file's key fields is not in any of the usual SQL Views about fields/columns or files/tables. There is a file that contains the keys for all files: Q ..read more
Visit website
Converting fetched columns into an array
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
2w ago
Coming up with a meaningful title for this post proved harder than normal. I was asked a question about how to fetch data, using a SQL Cursor, and convert some of the fetched columns into an array. The questioner had tried various approaches, but was always receiving an error in the SQL pre-compile step of his program. The file in question contained 35 fields he was interested in. The record would be for an account, by year and month, 31 balance fields one for every day of the month (yes, I know not all months have 31 days), and finally a total monthly change balance. The questioner wanted to ..read more
Visit website
May's presentations
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
2w ago
I feel honored to have been asked by Jon Paris and Sunsan Gantner to give two presentations as part of the System i Developer Lunch and Learn series. I will be presenting on Wednesday May 8, about converting spool files to PDF, and on Wednesday May 15, about what is new in CL. The Lunch and Learn presentations are all online and free to everyone. There are many interesting speakers covering a good range of subjects. To learn more go here and choose which of the Learn and Learn Series you want to register for. On Monday May 13 the Central Texas IBM i User Group, CTXiUG, welcomes IBM Champion ..read more
Visit website
Generate spreadsheet with SQL in batch job
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1M ago
When I wrote about the Db2 for i, or SQL, scalar function to create a Microsoft Excel spreadsheet in the IFS my example program ran interactively. I recently received a message asking the following: "good stuff even though I started to use it, it has some limitations so far: doesn't work with QTEMP files. Am I right?" I submitted my example program to batch and found that the expected spreadsheet was not generated. Looking in the job's job log I could see several messages related to files I created in QTEMP not being found. It would appear that the Java called by the GENERATE_SPREADSHEET subm ..read more
Visit website
End to free format directive
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1M ago
What I call totally free RPG and what IBM calls modern RPG has been around for nine years. This type of RPG always needs the **FREE directive starting in the first position of the source line. And what follows is the free form RPG, where the source line can start in any position. ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 01 **free 02 dcl-s Statement1 varchar(100) inz('Entered in free format RPG') ; Marc Raynor informed me of another directive that "ends" the free format RPG, **END-FREE. After that directive all valid RPG must be entered in t ..read more
Visit website
ACS 1.1.9.5 out now
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1M ago
I want to thank Shaker Steven for bringing to my attention this morning that the Spring 2024 update for Access Client Solutions, ACS, is now available. When I opened my ACS the following window popped up informing me the new update was available. Read more ..read more
Visit website
Patron saint of IT's day
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1M ago
In the western Christian calendar today is a special day for everyone working in information Technology, as it is Saint Isidore of Seville saint's day. St Isidore of Seville is special to the IT community as in 1997 he was made patron saint of all things related to computers and IT by Pope John Paul II. You can learn more about Isidore here. Happy St Isidore of Seville day, and let's hope for a little divine intervention so all of our IT projects in the next year complete successfully, on time, and on budget. "Looking at his example it looks so easy. Gratias tibi RPGPGM.COM ..read more
Visit website
April presentations
Rpgpgm.Com | From AS400 to IBM i
by Simon Hutchinson
1M ago
I have one presentation this month where I will be talking to my friends at the OCEAN user group of Southern California, on April 17 at 12:00 PM (PT). I will be sharing my favorite SQL features and functions. This meeting is online and free to everyone. Learn more and register here. If you are a member of an IBM i Local User Group, LUG, and you would like me to talk to your group, use the contact form to reach me. We can then arrange a date and subject. If you are a member of a LUG that is not listed on my LUG page, please contact me and send me your group's details ..read more
Visit website

Follow Rpgpgm.Com | From AS400 to IBM i on FeedSpot

Continue with Google
Continue with Apple
OR