I thought I could use IEBDG (Data Generator) to create a small file with a
single binary data record in it.

Let's take a simplified example.
I want to create a file with a 2 byte record with x'a1b2' as the contents.

I use FD to define two fields, each one byte long:
FD NAME=BYTE1,LENGTH=1,STARTLOC=1,PICTURE=161
FD NAME=BYTE2,LENGTH=1,STARTLOC=2,PICTURE=178

Then CREATE to use the two fields...
CREATE QUANTITY=1,NAME=(BYTE1,BYTE2)

But when I run it, I get errors from IEBDG:
IEB727I KEYWORD VALUE NOT FOLLOWED BY A BLANK OR COMMA.

I've tried various forms of the PICTURE=keyword, tried using CREATE only,,
all sorts of combinations, and with each a whole new set or error messages.

Yes, I could write a little rexx program to write my hex data to a new
dataset, but I prefer to do it with an existing utility if I can.

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.

Thanks

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to