5250 data stream displays secret APL symbols

Gene_Gaunt-GDFlLPZ4eRKEK/[email protected] Thu, 11 Mar 2010 12:25:48 -0500
Newsgroups gmane.comp.lang.as400.mi
Message-ID <OF171CB49B.60B53B5D-ON852576E3.005DBCA2-852576E3.005FBF1B@reviewworks.com>
While this isn't really MI related, I submit this as entertainment for MI
folks . . .   :-)

I just discovered this today, and although I'm not quite sure what I'm
looking at here, a quick Google search seems to point me in the direction
of APL symbols . . .

When I compile the following ILE RPG program and run it in my standard
every-day IBM iSeries Access for Windows 5250 display emulation session, I
see symbols like triangles, ovals, diamonds, inverted and sideways U's,
Greek letters alpha epsilon rho, tiny single byte combinations of the
letters HT, FF, CR, LF, HL, VT,  plus-sign-over-minus-sign symbol,
infinity, the empty set, arrows, some little things that look to me like
picnic tables and christmas trees . . .

The trick to make this work is: construct a horizontal scroll bar, then
overwrite transparent data onto the shaft of the horizontal bar.

Anyone know what I'm looking at here?


      //==============================================//
      //  this 5250 data stream displays APL symbols  //
      //  AUTHOR: GENE GAUNT of course                //
      //==============================================//

     FQSN132    CF   F 7345        workstn pass( *noind )

     D SizeOut         S              5U 0
     D SizeIn          S              5U 0
     D Function        S              1A
     D O               S           7340A   varying

     D                 DS
     D U                              5U 0
     D C                              1A   overlay( U: 2 )

     D RowCol          DS
     D   Row                          3U 0
     D   Col                          3U 0

     IQSN132    NS
     I                             U    1    1 0Qsn132_Row
     I                             U    2    2 0Qsn132_Col
     I                             A    3    3  Qsn132_Aid
     I                             A    1 7345  Qsn132_Input

      /free
       O =  x'0440';                      // clear unit
       O += x'0411' + x'0008';            // write to display
       O += x'0104' + x'00000019';        // start of header
       for U = 64 to 255;
          Row = %div( U: 16 ) * 2 - 6;
          if %rem( U: 16 ) = 0;
             Col = 8;
             O += x'11' + RowCol;         // set buffer address
             O += x'15'                   // write structured field
                + x'000F'                 // length of field
                + x'D953'                 // type is scroll bar
                + x'8000'                 // flag to make horizontal
                + x'000003E8'             // total positions
                + x'00000064'             // slider positions
                + x'41';                  // width of scroll bar
          endif;
          Col = 8 + %rem( U: 16 ) * 4;
          O += x'11' + RowCol + '   ';    // set buffer address
          O += x'10' + x'0001' + C;       // write transparent data
       endfor;
       O += x'0452' + x'0000';            // read MDT fields
       SizeOut  = %len( O );
       SizeIn   = %size( Qsn132_Input );
       Function = x'73';
       except SHOW;
       read QSN132;
       *INLR = *on;
      /end-free

     OQSN132    E            SHOW
     O                                           K6 'USRRCD'
     O                       SizeOut               U
     O                       SizeIn                U
     O                       Function
     O                       O

_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.