RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Blog - Content Section Layout
Command Line Program Call with 2 numeric parameters
User Rating: / 1
Written by Chamara Withanachchi   

From a command line a program can be called, as here with 2 numeric parameters with the values of -421 and 98200



    Call Pgm(LIBRARY/PROGRAM) Parm(X'421D' X'98200F') Packed 
    Call Pgm(LIBRARY/PROGRAM) Parm(X'F4F2D1' X'F9F8F2F0F0') Zoned 
Debug in 132X287 Mode
User Rating: / 2
Written by Chamara Withanachchi   

Normally STRDBG starts in 80x24 mode. You can change this mode to 132x27 mode with the following environment variable:



	AddEnvVar	EnvVar('ILE_DEBUGGER_1') +
			Value('ALLOW_WIDE_SCREEN') +
			Level(*Job) Replace(*Yes)

To go back to 80x24 mode, you use:


	RmvEnvVar	EnvVar('ILE_DEBUGGER_1') Level(*Job)
Avoid Locking Libraries in the Library List
User Rating: / 0
Written by Chamara Withanachchi   

There is a system value, Library Locking Level (QLIBLCKLVL), that you can use to control whether libraries that are in a job's library search list are locked. This system value is not new – it has been around since the V5R1 release – but it seems that it’s not very well known as I've talked with several people who’ve never heard of it.


The Library Locking Level system value has the default value of '1', which indicates that the libraries in the library search list are to be locked in each job. Each library in a job's library search list is locked when the job is started and the locks are released when the job ends.


As the number of active jobs on a system grows, the number of locks just for libraries can get very large. Consider an example where there are 1,500 user jobs and the library search list has 10 libraries – that's 15,000 locks held on the system just to protect those 10 libraries. This is not an efficient use of the system's locking table. This affects the performance of job initiation and termination when the locks are allocated and released; it also has an effect on overall system performance as there is a single lock table and additional overhead as this table grows very large.


IBM recommends setting this system value to 0, to not lock the libraries, it could not make that value the default value because, without additional changes, setting this system value to 0 would allow a library to be deleted or renamed even when the library is in the library search list.


If you change the QLIBLCKLVL system value to 0, you need to take an additional step to prevent the libraries from being deleted or renamed—you just need one job to allocate the libraries you want to protect. This job can be set up as an autostart job that runs in the controlling subsystem; it would simply do an Allocate Object (ALCOBJ) on each library that needs to be protected, then loop on a Delay Job (DLYJOB) command. This job would remain active until the controlling subsystem is ended or the job is explicitly ended.


By using this strategy, you can protect the libraries from being deleted or renamed and you can greatly reduce the number of locks on the system.


One final point - the QSYSARB system job locks the libraries that are defined in the system library list (QSYSLIBL) and the user library list (QUSRLIBL) system values.


Thanks for the Original Author http://ibmsystemsmag.blogs.com/i_can/2010/12/avoid-locking-libraries-in-the-library-list.html


The Open List of History Log Messages (QMHOLHST)
User Rating: / 0
Written by Chamara Withanachchi   

The Open List of History Log Messages (QMHOLHST) API provides information about messages that were sent to the QHST message queue. When the API is called, it will cause messages to be moved from the QHST message queue into the QHST database files. The API will return the message text based on the current contents of the message file when the API is called.


There are several advantages to using the API:


It’s a formal programming interface; prior to the introduction of the API, you had to read from the files directly to programmatically access the history log messages.


You can retrieve many messages with one invocation of the API, as opposed to reading the files record by record


Using the API, you can filter on message severity or you can filter on the message type; in addition you can specify with the filters to either include or omit the filtered data


You can also identify specific message IDs that should be retrieved or omitted


This API can be used to get messages from the QHST message queue into the history log files. Sometimes you need to do a DSPLOG twice in order to see the latest messages, but that is not the case when using the API.


RUNSQLSTM
User Rating: / 0
Written by Chamara Withanachchi   

RUNSQLSTM


Using this command you can execute a SQL Statement in a TXT type of member in a Source Physical File.


MONMSG msgid(cpf0000)
 
RUNSQLSTM srcfile(mylib/qtxtsrc) srcmbr(sqlstmt)
 
MONMSG msgid(cpf0000)
 
endpgm

Write Comment (0 comments)
<< Start < Previous 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 81 - 90 of 626