Thanks very much for this working example. What threw me was the format of the PICTURE= clause... I didn't realize the "length" was the number of digits to parse in the B'...' part.... you'd THINK that would be unnecessary as it would just count them itself. :-) I did try specifying the length of the field, which I also thought was redundant as I already coded LENGTH= for the field.
I know, IEBDG was probably written in the 1960's :-) I also learned about SORT... I never think of using sort for copying data or this sort of "translation". Thanks again for all the replies. Cheers On Tue, Jan 17, 2012 at 17:42, Gainsford, Allen <[email protected]>wrote: > > 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 > > IEBDG definitely isn't an easy way to do it, but if you really want to > use it, then the following works: > > FD NAME=BYTE1,LENGTH=1,STARTLOC=1,PICTURE=3,B'161' > FD NAME=BYTE2,LENGTH=1,STARTLOC=2,PICTURE=3,B'178' > CREATE QUANTITY=1,NAME=(BYTE1,BYTE2) > > Regards, > Allen > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

