Converting character to numeric with iSeries query

Query/400 provides many options for converting data, particularly dates, but lacks one important feature – converting character to numeric. However, there is a workaround even if it is a little “awkward” by using the MICROSECONDS function. Firstly, append your character field to the end of an arbitrary date. Next, use the MICROSECONDS function to extract it as […]

Comparing numeric dates using iSeries query

Many legacy systems stores dates in 6 digit numeric fields. This makes comparison difficult during a Query’s select statements. However, there is a way to handel these dates in Query/400.  Firstly, convert the numeric date field to a character field and formatting it with separators. Then it can be converted to a date field using the DATE function in query. […]

Converting ddmmyy to ccyymmdd using iSeries Query

The example below shows how to convert a six digit numeric date in DDMMYY format to an eight digit date using Query for i5/OS. Conversion takes place into CCYYMMDD and DDMMCCYY formats. Just replace example field mydate with your six digit numeric date. A date-window concept is used to interpret the year and the field window defines the […]

Sending Objects Between iSeries Machines

On the sending machine:   Create a temporary library & save file for the transfer CRTLIB TmpLib CRTSAVF TmpLib   Copy object to the temporary library CRTDUPOBJ OBJ(MyProg) FROMLIB(MyProgLib) OBJTYPE(*PGM) TOLIB(TmpLib)   Save the temporary library to save file SAVLIB LIB(TmpLib) DEV(*SAVF) SAVF(TmpLib)   Send the save file to the other machine SNDNETF FILE(TmpLib) TOUSRID((userName […]

Enabling a disabled profile ODBC

You can re-enable a user profile that has become disabled by using iSeries™ Navigator or by changing the user profile. You can also enable a disabled user profile by stopping and restarting iSeries NetServer™. There are three ways that you can enable a user profile that has been disabled. To use iSeries Navigator to enable […]