Using QUSRJOBI to retrieve Library list vs SQL. We will be adding additional examples of how SQL is taking over, where once only API’s could do the work. Simplifying code and helping to build a stronger developer, with the tools
SYSTEM – API CMD Processor
system() is a runtime C library function that performs the same purpose as the QCMDEXC API. With system() you pass a pointer to the command string and it is executed, no need for the for the command string length. The API is a good
Encrypting Data
Encrypting data using system API Required Parameter list for Qc3EncryptData Required Parameter Group: 1 Clear data Input Char(*) 2 Length of clear data Input Binary(4) 3 Clear data format name Input Char(8) 4 Algorithm description Input Char(*) 5 Algorithm description
Using QWCRSVAL to change password (QSYCHGPW)
The Retrieve System Values (QWCRSVAL) API lets you retrieve system values. This is for example use only — We do not recommend use of this program to bypass enterprise security policies. In this example system values that are associated with
Working examples of API’s
The term Application Programming Interface (API) can be applied in many instances. By definition, an API is an application-supplied program or procedure that allows an application program, which is written in a high-level language, to access specific data or functions
DATAQ
Data queues are a type of system object (type *DTAQ) that you can create and maintain using OS/400 commands and APIs. They provide a means of fast asynchronous communication between two jobs, or within the same job, because they use
STRTOK – reading single field/ multiple values by delimiter
C provides a number of string functions that can be useful to an RPG programmer. The example we have chosen to illustrate is strtok. This function can be used to break up a string into a series of “tokens”. One
Working with Data Areas
A data area can be used whenever you need to store information of limited size, independent of the existence of procedures or files. Typical uses of data areas are: To provide an area (perhaps within each job’s QTEMP library) to