|
||
February 13, 2013 - Vol 3, Issue 23
|
||
|
||
|
Feature Article
New Control Language Built-In Functions - January 2013By Guy Vig and Jennifer Liu - IBM - Control Language New Control Language Built-In Functions have been added via PTF for IBM i 7.1. The PTF SI49061 was approved January 25, 2013 by Jennifer Liu on the CL compiler team. Editors Note: A Big "Thank You" to Jennifer! Support for new trim built-in functions (i.e. %TRIM, %TRIML, and %TRIMR) was added by PTF SI48166 last October, and SI49061 supersedes SI48166. The new built-in functions have been added to both OPM CL and ILE CL that make string handling easier and faster:
1. %CHECK - Check Characters 2. %CHECKR - Check Reverse 3. %SCAN - Scan for Characters 4. %TRIM - Trim Characters at Edges 5. %TRIML - Trim Leading Characters 6. %TRIMR - Trim Trailing Characters If you want to use these new CL built-in functions on a 7.1 system, PTF SI49061 must be loaded and applied. Support will not be PTF'ed to 6.1 or 5.4 releases, but you can compile CL code that uses these new functions on your 7.1 system and specify TGTRLS(V6R1M0) or TGTRLS(V5R4M0) and then save the CL objects off your 7.1 system and restore them on an IBM i system running the 5.4 or 6.1 release of IBM i. All of the above built-in functions will have almost the same behavior as the RPG built-in functions by the same name. Descriptions of each new built-in function:%CHECK built-in functionThe check built-in function (%CHECK) returns the first position of a base string that contains a character that does not appear in the comparator string. If all of the characters in the base string also appear in the comparator string, the function returns 0. This function can only be used within a CL program or procedure. The %CHECK built-in function can be used anywhere that CL supports an arithmetic expression. %CHECK can be used alone or as part of a more complex arithmetic expression. For example, %CHECK could be used to compare to a numeric CL variable in the COND parameter of an IF or WHEN command. %CHECK can also be used to set the value of a CL command parameter, if the associated command object defines the parameter with EXPR(*YES) and TYPE of *DEC, *INT2, *INT4, *UINT2, or *UINT4. The format of the check built-in function is shown in this example: %CHECK(comparator-string base-string [starting-position]) |
|
In This Issue
Quick Links
Our Newsletter Sponsors
Platinum Sponsor |
IBM i Security ResourcesJohn Earl Memorial Tribute - Jan 2013 IBM i Security Videos from SecureMyi.com SecureMyi Newsletter Home and ArchivesSearch Security Site for IBM i and i5/OS IBM i Security Reference - IBM i 6.1 IBM i Security Reference - IBM i 7.1 QAUDJRN Audit Types By AUDLVL 6.1 QAUDJRN Entry Type Record Layout 6.1 RedBook - Security Guide for IBM i 6.1 PCI SSC Data Security Standards |
|
IBM i Security and Systems Management News BytesArpeggio Software releases ARP-SAVE Secure Backup Software for the IBM iArpeggio Software, a provider of security software solutions for the IBM i announced the release of ARP-SAVE, a native IBM i software solution for encrypting backups. ARP-SAVE is a software solution that can encrypt and save IBM i data and system objects as well as manage the restoration of secured backups. Read the ARP-SAVE Press Release. IBM i Security Calendar of Events
|
|
|
Featured YouTube Educational VideoIBM i Security
|
||
Security Shorts
By Dan Riehl IBM has provided the Machine Interface(MI) Built-In Function MODINVAU to modify the adopted authority attributes of a program's invocation level. In effect, it allows you to control the propagation of adopted authority from within a program. The MODINVAU function has one argument that can contain one of two values:
If '00' is specified, normal propagation of adopted authority to called programs and subprograms occurs. If '01' is specified, adopted authority is not propagated to called programs and subprograms. Here's an example of using the function in a Control Language program. Pgm CallPrc Prc( '_MODINVAU' ) Parm(x'01') /* Suppress Adopted Aut */ Go Main EndPgm This simple program uses the MODINVAU function to flip the invocation authority switch so that any adopted authority is not propagated to subsequent programs. In this case, the program takes us to the menu name MAIN, and adopted authority is not in effect at the MAIN menu. When we exit from the MAIN menu by using F3, we return to the calling program, where any adopted authority is still in effect. I suggest using this MI function in your application development to achieve more granular control over adopted authority. If a program needs adopted authority, create the program to adopt. But then also use the MODINVAU function to block the adopted authority from traveling down the stack to other programs. It's a much more elegant design than trying to take control of all programs by using the USEADPAUT(Use Adopted Autority) program attribute. If your adopting programs don't pass on their adopted authority, many security issues can be alleviated. You can read more about MODINVAU in the IBM Information Center article on MODINVAU.
|
Sponsored Links
IBM i, iSeries and AS/400
|
|
|
||
Send your IBM i Security and Systems Management News and Events! Send your Questions, Comments, Tips and Stories Copyright 2013 - SecureMyi.com, all rights reserved SecureMyi.com | St Louis MO 63017 |