Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Tips and Techniques: Say Goodbye to Binary Fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tips and Techniques: Say Goodbye to Binary Fields

    ** This thread discusses the article: Tips and Techniques: Say Goodbye to Binary Fields **
    ** This thread discusses the Content article: Tips and Techniques: Say Goodbye to Binary Fields0

  • #2
    Tips and Techniques: Say Goodbye to Binary Fields

    ** This thread discusses the article: Tips and Techniques: Say Goodbye to Binary Fields **
    With so much emphasis on SQL today, how do you reconcile an INT1 defined field in SQL? Is the size of INT1 not recognized by SQL? Does this mean a data overflow condition is possible for an UPDATE operation from an SQL transaction?

    Comment


    • #3
      Tips and Techniques: Say Goodbye to Binary Fields

      ** This thread discusses the article: Tips and Techniques: Say Goodbye to Binary Fields **
      Not sure why IBM chose originally to make binary an issue in RPG, like we need to shield the RPG programmer from binary. In MI it's simply either 2 or 4 bytes or whatever, signed or un-signed with the appropriate ranges. There is no "under the hood" shenanigans and they can be stored in char fields at will. There's no need to use a 10I int for a bin(4) API parameter. This is just more confusing. Concerning the chart of comparisons, most languages I have not found to be confusing at all, as a matter of fact very straightforward. RPG tends to be the exception. I think "packed" is just a carry-over from the memory issues of the past and probably creates more problems than it solves because of the variety of conversion issues. It's another one of those is it or isn't it questions, like is this a zoned field or a packed field, just un-necessary silliness. The sql issue int issue is selecting the appropriate numeric declaration. Most pl/sql I have seen tends to use NUMBER as the default for numeric variables with varying decimals. There is very little, if any concern with INT versus NUMERIC. Using the test function(Oracle) below yields a result of five billion going in and out of the function, using an integer parameter, which exceeds the limits of 4 byte binary. Old integer was = 5000000000 The new integer is = 5000000000 create or replace function testINT(old IN INTEGER) return integer is new INTEGER := old; begin DBMS_OUTPUT.put_line('Old integer was = '||old||' The new integer is = '||new); return(new); end testINT;

      Comment


      • #4
        Tips and Techniques: Say Goodbye to Binary Fields

        ** This thread discusses the article: Tips and Techniques: Say Goodbye to Binary Fields **
        Nice article, Bob, but I seem to get some empty boxes where the integer examples should be:
        Code

        Comment

        Working...
        X