Platform: *nix
IP: 38.107.179.237
Visits: 1


Okay...We all like to get free stuff..Right?!? Well thats what we are offering here....Free Stuff

  1. Free storage for your source code.
    Add Your code
  2. Free access to code samples.
  3. Free place to ask questions or just say what you want. 
    Share your thoughts

We are interested in what you have to say. If you can’t find what your’e looking for on this site....
Tell us  We will add it.

The small print says: We provide the source code on this site as only a guide. We do not recommend that anyone run any of the code provided on this site without first testing it. If you choose to download source from this site directly onto your production box without testing....Well, YOU are completely to blame and we don’t want to hear about it.

Iseries Related Websites

RUNSQLSTM

This program SQLRPGLE searches all tables in a library for a selected field. It writes these fields to a table and calls a program that writes SQL statements to a source member then runs command RUNSQLSTM to process.

Download Cities and Zips

We have been collecting your city and zipcodes and are now ready to start posting the compiled lists. Let us know if your state is missing and we will post it. Files are in .CSV format so they can easily be maintained with EXCEL.

Find source members

Pass a member name and a subfile will display *ALL copies of this source across the entire system.. (If authorized of course)

Data Structures (PSDS/INFDS)

A file information data structure (INFDS) can be defined for each file to make file exception/error and file feedback information available to the program.

Who Locked my Record?

Here is an example of a program that pops up a window showing the job, user and job number of the person locking the record it is trying to access.

Read Outq - QUSLSPL

This program reads multiple outqueues from an Iseries table. Then performs some action on the spooled files. Uses IBM system API - QUSLSPL.

Format Title Text

This is a simple subprocedure example. It requires two parameters, an input text string and an output text string. If passed "WELcoME TO Code400 WEBsite" it will return "Welcome To Code400 Website"

Working with AFP print files

This example program is a very basic project tracking application. I think the most useful part of this example is the *AFPDS printer output created. It uses the AFP keywords for drawing boxes, vertical & horizontal lines, multiple font changes and rotating text. This is all done with out the use of any add-on products. If you download the Iseries save file I have included data so that you will be able to see the output first hand.

PDF or HTML reports

We have put together a set of tools that will enable you to send Iseries reports to just about anyone you wish via email. We will show you how to convert those “ ugly ” greenbar reports into .PDF or .HTM then email them. A great use for this would be combining an attachment maybe XML with your reports in a nice html formatted email. Can you say ASN? Don’t let marketing know about this one.

Fun With Dates

Add or subtract a duration in years, months, days, hours, minutes, seconds, or microseconds Determine the duration between two dates, times, or timestamps Extract a portion of a date, time, or timestamp (for example, the day) Test that a value is valid as a date, time, or timestamp. To add or subtract a duration, you can use the + or - operator in free-form syntax or the ADDDUR or SUBDUR operation code in traditional syntax.

Working with User Spaces

One of the more powerful tools for iSeries programmers is the user space. Many IBM list APIs use a user space to hold the results of these API calls. A user space is similar to a data area, except that it can be much larger QUSCRTUS, QUSCHGUS, QUSPTRUS

QLGSORT - sort data

The Sort (QLGSORT) API provides a generalized sort function that can be directly called by any application program. This API can be used to sort data in files or data in an input buffer with a single call. This API can also be used to initialize a sort function where a series of calls using the Sort Input/Output (QLGSRTIO) API is done to repeatedly add data to be sorted as a set of records and return sorted data as a set of records.

Self Submitting Program

This program displays a screen, gets input then submits itself to batch to print a report.

Monitor WRKACTJOB

This program example runs in a loop looking for jobs in message wait.(*MSGW) when one is found the program loops thru a list of userid's and sends a break message to every interactive device this user is logged on to. It then waits five(5) minutes before resending the error message if still in *MSGW.

Message Subfile Example

Do You need a simple example of of a message subfile. Included in the download is the display file, the RPGLE program and a program to build the message file and add a few messages to test with.
Platform: *nix
IP: 38.107.179.237
Visits: 1


Okay...We all like to get free stuff..Right?!? Well thats what we are offering here....Free Stuff

  1. Free storage for your source code.
    Add Your code
  2. Free access to code samples.
  3. Free place to ask questions or just say what you want. 
    Share your thoughts

We are interested in what you have to say. If you can’t find what your’e looking for on this site....
Tell us  We will add it.

The small print says: We provide the source code on this site as only a guide. We do not recommend that anyone run any of the code provided on this site without first testing it. If you choose to download source from this site directly onto your production box without testing....Well, YOU are completely to blame and we don’t want to hear about it.

Iseries Related Websites

%ABS

Absolute value of expression

%ADDR

Address of variable

%ALLOC

Pointer to the allocated storage.

%CHAR

Value in character data type

%CHECK

First position in the searched-data that contains

%CHECKR

Last position in the searched-data that contains a character not in the list of the characters in the compare value. (Search begins with the right-most character and proceeds to the left.

%DATE

A date data-type value after converting the "value" to the specified date format. If no value is specified, the current system date is returned.

%DAYS

A duration value that can be used in an expression to add a number of days to a date value.

%DEC

Value in packed numeric format. If digits and decpos are specified the result value is formatted to fit in a variable of the number of digits specified.

%DECH

Half-adjusted value in packed numeric format. The length and decimal positions

%DECPOS

Number of decimal digits.

%DIFF

Calculates the difference between two date fields. The type of difference returned is specified by the duration-code.

%DIV

Performs integer division and returns the quotient (result) of that division operation.

%EDITC

String representing edited value.

%EDITFLT

Character external display representation of float.

%EDITW

String representing edited value

%ELEM

Number of elements or occurrences

%EOF

'1' if the most recent file input operation or write to a subfile (for a particular file, if specified) | ended in an end-of-file or | beginning-of-file condition '0' otherwise.

%EQUAL

'1' if the most recent SETLL (for a particular file, if specified) or LOOKUP operation found an exact match '0' otherwise.

%ERROR

'1' if the most recent operation code with extender 'E' specified resulted in an error '0' otherwise.

%FLOAT

Value in float format.

%FOUND

'1' if the most recent relevant operation (for a particular file, if specified) found a record (CHAIN, DELETE, SETGT, SETLL), an element (LOOKUP), or a match (CHECK, CHECKR, SCAN) '0' otherwise.

%GRAPHIC

Converts character data to double-byte character set value.

%HOURS

A duration value that can be used in an expression to add a number of hours to a time value.

%INT

Value in integer format

%INTH

Half-adjusted value in integer format

%LEN

Returns the length of a variable or literal value, or the current length of a varying length field. When used on the left side of the equal sign, sets the length of a varying length field.

%LOOKUPxx

An array index of the element in the array where the search-data is located.

%TLOOKUPxx

*ON if the search is successful, otherwise *OFF. (NOTE: The indexes of the searched-table and alternate-table are set to the index of the search-data if *ON is returned.)

%MINUTES

A duration value that can be used in an expression to add a number of minutes to a time value.

%MONTHS

A duration value that can be used in an expression to add a number of months to a date value.

%MSECONDS

A duration value that can be used in an expression to add a number of milliseconds to a time value.

%NULLIND

Value in indicator format representing the null indicator setting for the null-capable field.

%OCCUR

The current occurrence of the data structure, or sets the current occurrence of the data structure

%OPEN

'1' if the specified file is open '0' if the specified file is closed. Consider this built-in to be an 'Is this file open?" operation.

%PADDR

Address of procedure

%PARMS

Number of parameters passed to procedure

%REALLOC

Pointer to the allocated storage.

%REM

Performs integer division and returns the remainder from the division operation.

%REPLACE

String produced by inserting replacement string into source string, starting at start position and replacing the specified number of characters.

%SCAN

First position of search argument in string or zero, if not found.

%SECONDS

A duration value that can be used in an expression to add a number of seconds to a time value.

%SHTDN

*ON if the job is being shut down (e.g., when the PWRDWNSYS command is issued) otherwise *OFF is returned.

%SIZE

Number of bytes used by variable or literal. *ALL returns the number of bytes used by all the elements of the array, or all the occurrences of the data structure.

%SQRT

The square root of the expression or value.

%STATUS

0 if no program or file error occurred since the most recent operation code with extender 'E' specified most recent value set for any program or file status, if an error occurred if a file is specified, the value returned is the most recent status for tha

%STR

Characters addressed by pointer argument up to but not including the first x'00'.

%SUBDT

The extracted component of the date value. (The functional equivalent of the EXTRCT operation code.)

%SUBST

Substring value. If length is not specified, the substring begins with start and continues through the end of the string.

%THIS

Used for Java integration. Returns an Object reference.

%TIME

A time data-type value after converting the "value" to the specified time format. If no value is specified, the current system time is returned.

%TIMESTAMP

A timestamp data-type value with or without separators.

%TRIM

String with left and right blanks trimmed

%TRIML

String with left blanks trimmed

%TRIMR

String with right blanks trimmed

%UCS2

Returns a varying length value.

%UNS

Value in unsigned format

%UNSH

Half-adjusted value in unsigned format

%XLATE

The converted string is returned.

%XFOOT

Cross foots (totals) all the elements in an array