Focal Point
Using OCOPY in JCL to move a PDF file from MVS to the USS

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1171048331

April 01, 2005, 06:53 PM
Lou DeTota
Using OCOPY in JCL to move a PDF file from MVS to the USS
Does anyone know of somebody that has successfully moved a PDF file from MVS to the USS using the OCOPY command in JCL ? We have tried a number of options on the OCOPY with unsuccessful results. The resulting file calls Adobe Acrobat and Acrobat displays a dialog reading "corrupt or damaged file" or "file does not begin with %PDF-".

I can use FTP to drop this file in the USS and it is fine but our security policy makes it tough to get FTP access for all developers. If anyone has a clue what OCOPY options to use could you please share them with me.

Thanks,
Lou
April 01, 2005, 07:00 PM
<Pietro De Santis>
OCOPY looks like a utility to copy database files and backups - it might be mangling the PDF file.

I'm not sure what USS is, but have you tried to TSO ALLOC to the USS area to directly create the PDF file there instead of having to copy it?
April 01, 2005, 07:02 PM
j.gross
USS is IBM's implementation of Unix on (MVS) mainframes.
April 01, 2005, 07:12 PM
<Pietro De Santis>
Can you add a FILEDEF for the PDF report in the FEX?
March 02, 2006, 03:28 PM
Lou DeTota
I now have OCOPY working with FOCUS release 7.1.1. Releases above this do not yet work.

OCOPY JCL shown below:


//$2158HTM JOB NOTIFY=&SYSUID
//*MAIN SYSTEM=SY51
//***************************************************************
//* B A T C H J C L
//***************************************************************
//*
//***************************************************************
//TSOCOPY EXEC PGM=IKJEFT01
//********************************************************************
//*** THE QUOTED STRING IN THE FOLLOWING PATH STMT MUST BE LOWER CASE
//HFSOT DD PATH='/web_shared/appsdev/EMIS/cpmsmi/cartest.pdf',
//********************************************************************
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=(SIRWXU,SIRGRP,SIXGRP,SIROTH,SIXOTH)
//MVSIN DD DISP=SHR,DSN=$2158.LOU
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
OCOPY INDD(MVSIN) OUTDD(HFSOT) TEXT -
CONVERT('sys1.linklib(BPXFX311)') FROM1047 PATHOPTS(USE)
/*


WF 7.6.11 PDF deployment, z/OS, WAS, Excel, PDF, HTML. FOCUS 7.6.11, same outputs.