That would be in the JCL manual. But there aren't any examples. And if you
are not really UNIX literate, but just learning, it could be difficult to
put together something useful. So I'll give an example, using IEBGENER.
This will copy the READ macro from SYS1.MACLIB into a UNIX file in your
home directory.

//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=* OR WHATEVER
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=SYS1.MACLIB(READ),
//SYSUT1 DD PATH='/u/myusername/READ.macro',
// PATHOPTS=(OWRONLY,OTRUNC,OCREAT),
// PATHMODE=(SIRUSR,SIWUSR),
// FILEDATA=TEXT,
// RECFM=FB,LRECL=80,BLKSIZE=0

Hopefully, the PATH is self explanatory.

PATHOPTS contains the UNIX open() options. OWRONLY - only writing, no
reading; OTRUNC - if file exists, truncate to 0 bytes. OCREAT - if the file
doesn't exist, create it. One which I omitted is OEXCL. This say to fail
the job with a JCL error if the file already exists. This prevents
accidental overwriting. If you omit OTRUNC, you would "mod" on to the end
of the existing data.

PATHMODE sets the UNIX access bits. There are three sets of three bits. The
sets are for: (1) USER - the RACF owner of the file; (2) GROUP - the RACF
group of the owner of the file; (3) OTHER - everybody else. The three bits
are for Read, Write, and eXecute. SIRUSR is for read for user. SIWUSR is
write for user.

FILEDATA=TEXT tells the access method to insert an NEL (end of logical
line) character at the end of each logical record written. This is standard
for text files. By UNIX convention, text files do _NOT_ contain arbitrary
values. They only contain "printable" characters. Some control characters
are considered "printable". Such as tab, NEL, and a few others (I don't
have a complete list). In addition to TEXT, there are BINARY and RECORD.
BINARY means just that. But there are no record boundry indications. So
unless you know what you're doing, it may be impossible to process the
resulting file. RECORD says that the data is BINARY, but each logical
record in the file is preceded by a 4 byte binary integer (PIC S9(8)
BINARY) which contains the number of following bytes which are the next
logical record. This is similar to a VB file, except that (1) the entire 4
bytes are valid data, not LLBB; (2) the length is only the length of the
data portion, and does not include the 4 bytes themselves.

For UNIX files, you really should specify the RECFM=, LRECL=, and BLKSIZE=
because a UNIX file does not contain any meta data (VTOC entry) which has
this information. Well, you might get away without specifying it, depending
on the application.

On Wed, Jul 24, 2013 at 10:32 PM, Ze'ev Atlas <zatl...@yahoo.com> wrote:

> OK
> Assuming I have OMVS available to me and my hoe is:
> /u/myusername
>
> and assume that I used oedit to create a simple text file
>
> How would I access this file from, let's say, IEBGENER JCL
>
> Thanks
> ZA
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

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

Reply via email to