Donald Russell at IBM Mainframe Discussion List <[email protected]>
wrote on 01/17/2012 04:01:47 PM:
>...
> The hex data is constant, I just want it written to a new data set when a
> job runs...
>
> Is there another utility that can do this easily?
>
> In a nutshell:
>
> //S1 EXEC PGM=...
> //SYSUT1 DD *
> a1b2c3d4e5f6
> /*
> //SYSUT2 DD LRECEL=6,RECFM=F,...
> //SYSIN DD *
>  COPY HEXCHARTOBINARY
> /*
>
> and the resulting file will be 6 bytes long, with x'a1b2c3d4e5f6' as
> contents.

Here's a DFSORT job that will do what you asked for using the TRAN=UNHEX
function::

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
A1B2C3D4E5F6
//SORTOUT DD DSN=...
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(1,12,TRAN=UNHEX)
/*

I assumed you could use uppercase characters (A-F) for the input rather
than lowercase
characters (a-f).  But if you really need to use lowecase characters,
DFSORT's TRAN=LTOU
(lowercase to uppercase) and TRAN=UTOL (uppercase to lowercase) functions
can be used
as well.

Frank Yaeger - DFSORT Development Team (IBM) - [email protected]
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

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

Reply via email to