• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Easy Conversion To ASCII

    September 29, 2015 Ted Holt

    The system we love so well has a long love affair with the EBCDIC collating sequence, but most of the world runs on ASCII and Unicode. Dealing with ASCII data has not been a trivial experience for RPG programmers, but IBM i 7.2 adds a feature that helps immensely.

    In ancient days, RPG programmers would call the QDCXLATE API, which uses a translation table, to convert EBCDIC to ASCII. This is probably not a good solution. IBM’s translation tables were good for their time, but times have changed.

    A modern solution is the iconv family of code conversion APIs, which

    …

    Read more
  • RCAC In DB2 For i, Part 3: Advanced Topics

    September 15, 2015 Michael Sansoterra

    In Part 1 and Part 2 of this RCAC series, I covered row and column access control (RCAC) row permissions and column masks, and demonstrated how they can be used to add an additional layer of security to your DB2 for i database without necessarily having to change legacy applications. This tip will explore the RCAC topic a little further by discussing a few advanced concepts that may affect your implementation of RCAC.

    Bypassing RCAC With SET SESSION AUTHORIZATION

    When the SET SESSION AUTHORIZATION statement is executed, a SQL database connection is “impersonated” to run under the identity of another

    …

    Read more
  • Another Reason To Use Unrequired Correlation Names

    September 15, 2015 Ted Holt

    Almost eight years ago I gave you two good reasons to use a correlation name when SQL did not require one. A recent experience revealed to me another good reason to use an unnecessary correlation name, and I am happy to be able to share that information with you today!

    A colleague of mine had an SQL query that ran to completion but produced the wrong results. He asked me to take a look at it, and I’m glad he did, because the experience taught me something. Let me set up the situation for you.

    Assume two tables: a table

    …

    Read more
  • A First Look At SQL Descriptors

    September 15, 2015 Paul Tuohy

    SQL descriptors allow for incredible flexibility when it comes to constructing dynamic SQL statements and/or processing the results of a dynamic SQL statement. But, since this is an introduction, let’s look at how they can be used in constructing dynamic SQL statements and leave their use in processing results for a later article.

    Assume we want to embed the following SQL statement in an RPG program:

    select workDept, empno, firstname, lastname from employee
       where workDept  = ?  and
             hireDate  >= ? and
             birthDate >= ?
       order by workDept, empno
    

    The difficulty we have is that comparison values may or may

    …

    Read more
  • RCAC in DB2 For i, Part 2: Column Masks

    September 1, 2015 Michael Sansoterra

    In part 1 of this series, I discussed the row permissions portion of the new row and column access control (RCAC) security feature that was introduced in DB2 for i 7.2. In this tip, I will demonstrate how to use RCAC to hide sensitive information without hiding entire rows from a user.

    To sum up the last tip, RCAC is beneficial for protecting an integral business asset: data. Row permissions allow a database administrator to limit the rows users can view or modify in a table by defining access rules. Permissions to access rows are generally based on user profile

    …

    Read more
  • How Do I Join Tables? Let Me Count The Ways

    September 1, 2015 Ted Holt

    Normalization is the process of making sure that each datum is stored in the proper table. Storing data in the wrong place gives rise to anomalies, a fancy word for problems, and you have enough problems already. To make sense of normalized data requires that tables be joined. Do you know the methods to code a join with SQL and the advantages and disadvantages of each one?

    Method 1: WHERE

    When I first learned SQL, joining was done in the WHERE clause of the SELECT statement. Here’s an example.

    select h.*, d.*
      from SalesOrderHeaders as h,
           SalesOrderLines   as d
     where 
    …

    Read more
  • The Path To XML-INTO Happiness, Part 3

    September 1, 2015 Jon Paris

    Note: The code accompanying this article is available for download here.

    In part 1 and part 2 of my XML series, I introduced you to the basics of using RPG’s XML support. In this tip we begin to explore some of the challenges that you may face when processing commercial XML documents, and the support RPG offers to handle them.

    Take a look at the snippet of an XML document below:

    <ItemsXRef >
        <Header RefId="xxxxx" TimeStamp="2011-11-30T00:06:06.643Z">
            <to id="nnnnnn" name="nnnnnn"/>
            <from id="nnnn" name="A Company in Canada"/>
            <TransactionType>ItemXref</TransactionType>
        </Header>
        <Items>
            <SKU>
                <SKUID>10050322</SKUID>
                <UPC>6866261486</UPC>
                <WIN>30269675</WIN>
                <StatusCode>A</StatusCode>
            </SKU>
            <SKU>
                   ... <snip> ...
            </SKU>
            
    …

    Read more
  • RCAC in DB2 for i, Part 1: Row Access Permissions

    August 18, 2015 Michael Sansoterra

    In a world of hackers, every data asset is vulnerable to theft or tampering. Protecting data can be costly, yet being hacked is even costlier. Enter IBM‘s row and column access control. RCAC is a big deal as businesses are looking for effective tools to control security, in particular, database security.

    RCAC allows database security administrators to tighten the reigns on who can view data in the database. Even better, many of these security measures can be implemented without changing applications. Versions of DB2, Postgre SQL, Oracle, SQL Server (currently in preview with Azure v12 and SQL Server 2016),

    …

    Read more
  • An Introduction to Processing XML With RPG, Part 2

    August 18, 2015 Jon Paris

    Note: The code accompanying this article is available for download here.

    In the first part of this series I introduced you to the basics of using RPG’s XML-INTO op-code. In that tip I showed how the provision of a count provided by RPG in the PSDS can be used to determine how many of a repeating element were processed.

    However, as I noted at the time, this can only be used when handling a repeating outer element. But what if there is a repeating element within each of those outer elements? In this second part of the series we

    …

    Read more
  • Set Your Library List From A Job Description

    August 18, 2015 Ted Holt

    Note: The code accompanying this article is available for download here.

    On August 4, 2015, I asserted that the proper residence of a library list is a job description. Talk is cheap. Now it’s time for me to put my money where my mouth is. I have a utility that gives me easy access to the library lists in job descriptions. I wrote this utility last year, and now I use it daily with great results. Today I make that utility freely available for you to use in your shop.

    If I were to follow IBM’s naming convention, I

    …

    Read more

Previous Articles Next Articles

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle