On 12 October 2012 18:20, Frank Swarbrick <[email protected]> wrote:
> Does anyone have an assembler program I can use that can be assembled to 
> create a load module for use with the IDCAMS GRAPHICS(TABLE()) parameter that 
> will work with an ASCII encoded dataset?
>
> Specifically, I want to be able to execute IDCAMS with 
> PARM='GRAPHICS(TABLE(ASCII))' and get a result looking something like this:
>
> IDCAMS  SYSTEM SERVICES
> GRAPHICS(TABLE(ASCII))
> IDCAMS  SYSTEM SERVICES
> IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
>
>   PRINT INFILE(FILE1) DUMP
> IDCAMS  SYSTEM SERVICES
> LISTING OF DATA SET -MY.ASCII.FILE.TXT
> RECORD SEQUENCE NUMBER - 1
> 000000  33303832 30313041 30323832 30313031   30304243 32453636 33433142 
> 30423545   *3082010A0282010100BC2E663C1B0B5E*

I've never tried using such a table with IDCAMS, but from the
description, all you need is something like this:

ASCII    CSECT
*         From CP = 819 To CP = 037
         DC    X'00010203372D2E2F1605250B0C0D0E0F'  00-0F
         DC    X'101112133C3D322618193F271C1D1E1F'  10-1F
         DC    X'405A7F7B5B6C507D4D5D5C4E6B604B61'  20-2F
         DC    X'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'  30-3F
         DC    X'7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'  40-4F
         DC    X'D7D8D9E2E3E4E5E6E7E8E9BAE0BBB06D'  50-5F
         DC    X'79818283848586878889919293949596'  60-6F
         DC    X'979899A2A3A4A5A6A7A8A9C04FD0A107'  70-7F
         DC    X'202122232415061728292A2B2C090A1B'  80-8F
         DC    X'30311A333435360838393A3B04143EFF'  90-9F
         DC    X'41AA4AB19FB26AB5BDB49A8A5FCAAFBC'  A0-AF
         DC    X'908FEAFABEA0B6B39DDA9B8BB7B8B9AB'  B0-BF
         DC    X'6465626663679E687471727378757677'  C0-CF
         DC    X'AC69EDEEEBEFECBF80FDFEFBFCADAE59'  D0-DF
         DC    X'4445424643479C485451525358555657'  E0-EF
         DC    X'8C49CDCECBCFCCE170DDDEDBDC8D8EDF'  F0-FF
         END   ASCII

Assemble, link into a module called "ASCII" (or whatever you like -
better to encode the codepage names into the module/member name if you
anticipate using more than one table), put it in your STEPLIB, and try
it.

The book says to use "." for unprintable characters. This table does
not do that - it is round-trippable between the two codepages, but you
can easily change all positions in the rows 00-1F, 7F, and 80-FF to
X'4B' if you want only traditional ASCII.

If you prefer different EBCDIC or ASCII codepages - maybe 1047 for
EBCDIC if you like your square brackets elsewhere, let me know. I
generate these using 20 lines of trivial REXX from the IBM CDRA
supplied single-byte tables. The program can generate the above
assembler format, C declarations, traditional dump format, and a few
others.

Hmmm... Well I had to try it, didn't I? And there are two problems:
IDCAMS seems to be running APF authorized, which leads to a 306 abend
when it loads my module, which is going to make things inconvenient.
But since this a sandbox system, I just made the STEPLIB authorized,
and now I have an 0C4 abend on an EXecute in the depths of IDCAMS. So
I don't know, and it's past my bedtime. :-(

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to