Page 1 of 1

Accessing a Unix folder as a partitioned dataset

PostPosted: Sat Oct 03, 2015 8:15 pm
by AntonioS
Hey there,

I am trying to do a Cobol compile with copybooks that I have locally. In order to do so, these copybooks must be copied to the mainframe, the a compile job can be triggered.

What I did so far:

I have ftp'd the copybooks to a directory in the Unix HFS, then I added the following statement
//SYSLIB  DD  PATH='/u/myself/transfer/copybook',
//           PATHDISP=KEEP,FILEDATA=TEXT,
//           PATHOPTS=(ORDONLY)
//           RECFM=FB,LRECL=80,BLKSIZE=800


This works so far which means the compiler can access the directory "copybook" like a partitioned dataset, and searches for any copybook members referred to in a COPY statement in the Cobol program. That's cool!

However, there is still a problem because the copybooks all have an file name extension (.cpy) which causes the compiler not to be able to find the referred copybooks unless I rename them to remove the extension.

Is there a way to ignore the file name extensions? After all, a member in a partitioned dataset cannot have an extension anyway, so I had expected and hoped that they would be ignored.

Or am I completely on the wrong track? I also tried sending the copybooks directly to an MVS PDSE using mput, but I have the same problem here: mput complains for each file that abode.cpy is not a valid MVS dsname. Any hints?

Re: Accessing a Unix folder as a partitioned dataset

PostPosted: Sat Oct 03, 2015 10:17 pm
by prino
And the third solution? Copy them to PS datasets and move these to your PDS(E), or just rename them on the PC to remove the .cpy, and then upload them to a PDS(E).

Now was that so difficult?

And what does this actually have to do with JCL?

Re: Accessing a Unix folder as a partitioned dataset

PostPosted: Sun Oct 04, 2015 4:07 am
by AntonioS
prino wrote:And what does this actually have to do with JCL?


Thank you for your reply.

The point about JCL is, how do I access files as members when they have a file extension suffix. Is it impossible?