Re: 64encode exec?

2010-12-27 Thread Les Koehler

Do you mean a base64 encode? Or 64 bit encode?

Les

Shimon Lebowitz wrote:

Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
or do I need to write my own?

Thanks,
Shimon



Re: 64encode exec?

2010-12-27 Thread Shimon Lebowitz
Base64 Encode, like the 64encode pipe stage.

Thanks!

On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon




Re: 64encode exec?

2010-12-27 Thread Kris Buelens
Why is a PIPE stage not good?  You can wrap an exec around it, or
...anything possible with CALLPIPE/ADDPIPE

2010/12/27 Shimon Lebowitz shim...@iname.com

 Base64 Encode, like the 64encode pipe stage.

 Thanks!

 On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon





-- 
Kris Buelens,
IBM Belgium, VM customer support


Re: 64encode exec?

2010-12-27 Thread Shimon Lebowitz
Ummm... gulp... because it needs to run on the OtherSystem.
(Please don't tell me that pipes are available there too. We spent months
trying to
verify that claim and it just wasn't possible, except as a special bid or
something like that,
at what was considered here a totally insane price).

So, does anyone have an exec that does the same stuff?

Thanks
Shimon


On Mon, Dec 27, 2010 at 2:05 PM, Kris Buelens kris.buel...@gmail.comwrote:

 Why is a PIPE stage not good?  You can wrap an exec around it, or
 ...anything possible with CALLPIPE/ADDPIPE

 2010/12/27 Shimon Lebowitz shim...@iname.com

 Base64 Encode, like the 64encode pipe stage.

 Thanks!

 On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon





 --
 Kris Buelens,
 IBM Belgium, VM customer support



Re: 64encode exec?

2010-12-27 Thread Richard Troth
Depends on what Other System you mean, exactly.  There is Pipelines for
MVS (TSO), but I am guessing that YOU of all people KNOW that.  So are you
talking about Unix/Linux?  or maybe Windows?

You could extract the logic from 64ENCODE REXX and make REXX from it.

-- R;   





On Mon, Dec 27, 2010 at 08:19, Shimon Lebowitz shim...@iname.com wrote:

 Ummm... gulp... because it needs to run on the OtherSystem.
 (Please don't tell me that pipes are available there too. We spent months
 trying to
 verify that claim and it just wasn't possible, except as a special bid or
 something like that,
 at what was considered here a totally insane price).

 So, does anyone have an exec that does the same stuff?

 Thanks
 Shimon



 On Mon, Dec 27, 2010 at 2:05 PM, Kris Buelens kris.buel...@gmail.comwrote:

 Why is a PIPE stage not good?  You can wrap an exec around it, or
 ...anything possible with CALLPIPE/ADDPIPE

 2010/12/27 Shimon Lebowitz shim...@iname.com

 Base64 Encode, like the 64encode pipe stage.

 Thanks!

 On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon





 --
 Kris Buelens,
 IBM Belgium, VM customer support





Re: 64encode exec?

2010-12-27 Thread Shimon Lebowitz
z Other System... z/OS

Yes, I was going to mimic the pipe stage logic, but just wanted to see if I
could avoid reinventing a wheel.

Shimon


On Mon, Dec 27, 2010 at 4:25 PM, Richard Troth r...@casita.net wrote:

 Depends on what Other System you mean, exactly.  There is Pipelines for
 MVS (TSO), but I am guessing that YOU of all people KNOW that.  So are you
 talking about Unix/Linux?  or maybe Windows?

 You could extract the logic from 64ENCODE REXX and make REXX from it.

 -- R;   






 On Mon, Dec 27, 2010 at 08:19, Shimon Lebowitz shim...@iname.com wrote:

 Ummm... gulp... because it needs to run on the OtherSystem.
 (Please don't tell me that pipes are available there too. We spent months
 trying to
 verify that claim and it just wasn't possible, except as a special bid or
 something like that,
 at what was considered here a totally insane price).

 So, does anyone have an exec that does the same stuff?

 Thanks
 Shimon



 On Mon, Dec 27, 2010 at 2:05 PM, Kris Buelens kris.buel...@gmail.comwrote:

 Why is a PIPE stage not good?  You can wrap an exec around it, or
 ...anything possible with CALLPIPE/ADDPIPE

 2010/12/27 Shimon Lebowitz shim...@iname.com

 Base64 Encode, like the 64encode pipe stage.

 Thanks!

 On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler 
 vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon





 --
 Kris Buelens,
 IBM Belgium, VM customer support






Re: 64encode exec?

2010-12-27 Thread Shimon Lebowitz
My thanks to Sir Rob, who kindly supplied the code for a rexx exec to do
this.

Thank you!

Shimon


On Mon, Dec 27, 2010 at 1:10 PM, Shimon Lebowitz shim...@iname.com wrote:

 Base64 Encode, like the 64encode pipe stage.

 Thanks!


 On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon





Re: 64encode exec?

2010-12-27 Thread Dale R. Smith
On Mon, 27 Dec 2010 19:47:24 +0200, Shimon Lebowitz shim...@iname.com 

wrote:

My thanks to Sir Rob, who kindly supplied the code for a rexx exec to do

this.

Thank you!

Shimon


On Mon, Dec 27, 2010 at 1:10 PM, Shimon Lebowitz shim...@iname.com 
wrote:

 Base64 Encode, like the 64encode pipe stage.

 Thanks!


 On Mon, Dec 27, 2010 at 12:44 PM, Les Koehler 
vmr...@tampabay.rr.comwrote:

 Do you mean a base64 encode? Or 64 bit encode?

 Les


 Shimon Lebowitz wrote:

 Is there a 64encode EXEC (not pipe stage) hanging around anywhere,
 or do I need to write my own?

 Thanks,
 Shimon


Here is some Assembler code that I have that is supposed to do base64 
encoding on z/OS.  I think I got it from the CBT Tape, but I don't 
remember for sure! 

* PROGRAM NAME: ENCODE64
* DATE WRITTEN: October 2000
* AUTHOR:   Mark FeldmanEmpire Medicare Services
* FACILITY: XMITIP Support
* ENVIRONMENT:  Assembled under OS for MVS
*   N.B.: this program file contains lower-case characters!
* Characters at address TRANTBL must remain l/c!
* SUMMARY:
* ENCODE64 encodes a file into base64 format.  In the base 64
* scheme, successive 24-bit groups (3 bytes) of data are
* converted into 4 6-bit values, which are mapped to the base
* 64 alphabet.  The base64 alphabet consists of these characters:
*0 - 25: upper case alphabet
*   26 - 51: lower case alphabet
*   52 - 61: digits 0 - 9
*62: +
*63: /
*
* Input bytes are encoded from left to right (in the IBM mainframe
* view of a byte), or from high-order to low-order bits, as follows:
* Input byte 1, bits 2-7   == Output character 1 (in Base64)
* Input byte 1, bits 0-1 + == Output character 2
*   byte 2, bits 4-7 +
* Input byte 2, bits 0-3 + == Output character 3
*   byte 3, bits 6-7 +
* Input byte 4, bits 0-5   == Output character 4
*
* Note that the size of the file expands about 33% during encoding,
* since each set of three characters are converted to four bytes.
*
* According to the base64 standard, special processing is required
* at the end of file if the number of bytes in the file does not
* end evenly in a 3-character group.  In this case, one or two
* pad characters (=) are added to the last record and the rest
* of the record is left blank.  Following the standard, the
* encoded output file contains fixed length, 76 character records.
*
* This program can process a fixed (F), variable (V) and undefined (U)
* files of any record length (spanned records are not allowed).
*
* JCL for ENCODE64: The input DD is named ENCODIN;
* the output DD is ENCODOUT.  The output DCB information may be
* left blank, i.e., the RECFM and LRECL are supplied by this program.
* By default, the output LRECL=76 and the BLKSIZE defaults to an
* optimal size (this may NOT work in a non-SMS environment).
* DD SYSOUT is used for informative messages and end-of-job
* totals.  The program will abend with a condition code of 100 if
* it encounters any error (the only two checked are errors opening
* the input or output files).
*
* //JOBLIB  DD  DSN=load-library-containing-ENCODE64,DISP=SHR
* //S010 EXEC PGM=ENCODE64
* //ENCODIN  DD DSN=your-input-file,DISP=SHR
* //ENCODOUT DD DSN=encoded-output-file,
* //UNIT=unit,SPACE=(TRK,(3,2),RLSE),
* //DISP=(NEW,CATLG,DELETE)
* //SYSOUT  DD SYSOUT=*
* //SYSUDUMPDD SYSOUT=Z
*
* Base64 encoding is an accepted content-transfer-encoding value
* in the Internet MIME standard.  Using base64 encoding avoids
* communication path problems that may arise if a file being
* appended to an Email contains non-printable characters.  This
* program can be used with the XMITIP Rexx program to append
* binary files to an Email originating on the mainframe.  ENCODE64
* is much faster than the encoding algorithm built into XMITIP.
*
* For more information on base64, refer to the MIME standards
* at http://www.oac.uci.edu/indiv/ehood/MIME/2045/rfc2045.html.
*
**
ENCODE64 CSECT
R0   EQU   0
R1   EQU   1
R2   EQU   2
R3   EQU   3
R4   EQU   4
R5   EQU   5
R6   EQU   6
R7   EQU   7
R8   EQU   8
R9   EQU   9
R10  EQU   10
R11  EQU   11
R12  EQU   12
R13  EQU   13
R14  EQU   14
R15  EQU   15
*
 USING *,R11  R11
 LRR11,R15ADDRESSABILITY ON ...
 STM   R14,R12,12(R13)SAVE CALLER'S REGISTERS
 LRR14,R13R14=CALLER'S SAVE AREA
 LAR13,SAVEAREA   OUR SAVE AREA
 STR14,4(,R13)STORE CALLERS SAVE AREA
 STR13,8(,R14)AND OURS
*
* SUBROUTINE ENINIT OPENS FILES AND DOES OTHER HOUSKEEPING
 BAL   R15,ENINIT INITIALIZE
 LTR   R1,R1  TEST RETURN CODE
 BZM0010  CONTINUE
 ABEND 100,DUMP   ABEND - OPEN FAILURES
*
* ENCODING