New Events Page April 25, 2006
I have added a new Events page today. Here we will be posting MMUG Meeting and other iSeries related events. Check out the event on May 16th, 2006 at Rosenblatt Stadium. It is a triple deal. You get a presentation on WebFOCUS, lunch and Omaha Royals game to watch. Read about this on Events page and register either on Information Builder’s Web site or send an email to Richard Ely with your name, company name and e-mail address.
Please note: This event is NOT sponsored by Midlands Midrange Users Group. This information is provided as a service to iSeries Users community.
Possible Related Links
Tip: Converting String to Number in QUERY/400 April 18, 2006
Theoretically there is no command to convert a string to number in Query/400, but I found this tip on an iSeries forum. It is little clumsy but can be handy workaround when you do not have access to SQL.
Here is what you do:
The TIMESTAMP function accepts a character representation of a valid time stamp. Because part of the time stamp is a 6 digit microsecond, use the character string to be converted for the microsecond.
* The date and time used is constant and is NOT important for the conversion
* The format of the microsecond is mmmmmm:
6 digits are required and they must be numbers.
If your field is less that 6 digits, it is to be Zero-filled to the left, for example, ‘0000xx’, for a 2-digit field.
If your field is more than 6 digits, do multiple conversions and use numeric operations to calculate the correct value.
If your field requires a decimal portion, do the conversion, then use numeric operations to convert to the correct decimal value.
Once the time stamp is created, the MICROSECOND function can be used to retrieve the numeric representation of the character field.
Following is an example:
fldString is a 4 digit character field in the file. Define the following result fields:
tStamp TIMESTAMP(’1995-01-01-12.00.00.00′||fldString)
fldNumeric MICROSECOND(TIMESTAMP)
If fldString has a value of ‘0045′, then tStamp will look like ‘1995-01-01-12.00.00.000045′ and fldNumeric will result in 45.
If you have a better solution, please post it here by clicking on comments.
Possible Related Links
QSHELL on iSeries April 14, 2006
Ever wondered about QSHELL? It is a UNIX shell on iSeries. To access QSHELL, type in STRQSH on the command line. But before you go any further, head out to Thibault Dambrine’s tutorial : Exploring iSeries QSHELL: Concepts & Tutorial.
This tutorial explains in simple language the syntax of Unix commands, where to find help, how permissions work, and the basics of how to write a QShell script.
Some background on QSHELL: To be fully Java compliant, IBM needed to supply a JDK (Java Development Kit) on its iSeries eServer that could run standard Java commands such as Java, Javac or Javadoc, the same way other (UNIX) systems could. There was only one snag, OS/400 was NOT ’a flavor of’ UNIX. The OS/400 IBM team resolved this hurdle by supplying a new ‘UNIX style shell‘ on the iSeries and appropriately named it ‘QSHELL‘.
Possible Related Links
Open Source iSeries Toolkit April 11, 2006
While searching for an open source software for my other project, I came across Open Source iSeries Toolkit. For those of you new to Open Source Software, it is a program in which the source code is available to the general public for use and/or modification from its original design free of charge. Open source code is typically created as a collaborative effort in which programmers improve upon the code and share the changes within the community. Open source sprouted in the technological community as a response to proprietary software owned by corporations. Learn more about it at opensource.org.
iSeries Toolkit is a bag of utilities that support Dynamic SQL, Messaging, IFS file access, User spaces, User indexes, Dynamic Native File Access, XML, and Source Generation. These RPGIV ILE and Java tools work on most recent releases of the iSeries and AS/400.
Get Involved
Apart from being a user of this toolkit, you can get involved as a developer. You can actually help developing the iSeries Toolkit by either fixing the bugs reported or adding / enhancing the utilities by checking the features requested. This open source project has a very active community that is constantly working on improving the toolkit. You can download the toolkit and try it yourself.
Here are some of the features requested:
- UDF suggestion for dates
- Include a complete list of subprocedures
- DMPSQL data from a table.
- ILE Module Information
- New feature in Seq().
- UserSpace Viewer.
- Add support for the Qp0lGetAttr API
- Update Debug info in CHGOBJ Command
- New SAVZIP Command
Are you ready to accept these challenging tasks?
If you have any comments or opinions, please click on "Comment" link below this article.
Possible Related Links
iSeries RPG programming links April 8, 2006
I am sure every RPG programmer is aware of Scott Klement’s Club Tech iSeries Programming Tips Newsletter, but do you know, he has few other goodies in his bag?
For rookie iSeries RPG programmers, he has a tutorial titled How to Learn RPG.
For iSeries programmers, who want to experiment with pointers, try having Fun with RPG pointers.
Learn about Reading and Writing from Integrated File System or if you are internet-inclined try Sockets and TCP Programming.
Possible Related Links
iSeries Interview Questions April 1, 2006
*** The intention of these interview questions is to challenge my readers. I never intended to give out the answers. Those who seek answers, please use Google search for your quest. Google is your friend. Good Luck!
iSeries has evolved a lot since 1988, but interview questions have remained practically unchanged. Here are few of them which I came across on a forum. This post is also in the General forum. Feel free to contribute the answers to these questions either here in the comments area or in the forums area.
- How do you know if a record exists without doing a READ and CHAIN?
- What will be your approach in going either for OPNQRYF or Logical files. Which one to go for?
- How do you call procedures in ILE?
- What is the syntax of passing parameters to a procedure by value?
- How do you code file / field renames in ILE RPG?
- In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?
- How do you find whether a record is locked or not?
- What is the difference between RPG/400 and RPG4
- How do you find whether a job is a batch job or interactive?
- What you have to do in the display file when you are using message subfile?
- How to set on/off a group of indicators in a single statement?
- How can you determine the number of characters in a variable?
- Let’s consider a variable X of length 20. Move value ‘ABC’ to it.How to determine how many characters does X have?
- Suppose you have 3 members in a database file. How to read records from all the members without using CL (OVRDBF) i.e. Entire process should be handled exclusively in a RPG program?
- How do you do indexing in a physical file?
- Can an indexed file be accessed in arrival sequence in RPG?
- When will DUMP & DEBUG be ignored?
- what is the necessary command needed before OPNQRYF and why?
- Can you copy the records created by the OPNQRYF to other files and how?
- What are different ways to pass data between programs and which one is the efficient way?
- What are the necessary keywords required to code a message subfile?
- What is the purpose of FRCDTA keyword?
- What is the purpose of PUTOVR keyword?
- What is journalling and commitment control?
- What is the purpose of Panel Groups?
- How can a screen field that has changed since the last output operation be detected?
- What would be the effect on the field where reverse image, underline and high intensity?
- Can more than one subfile record be displayed on one line?
Possible Related Links
