Very interesting. Collapsing the two steps and eliminating the intermediate Unix file also works, but I do have explicit DCB information in the JCL for both SYSUT1 and SYSUT2, so maybe that's what makes the IEBGENER process work here.
I had been told by the coworker who solicited my help that they had already tried IEBGENER to copy the file and that it failed, but I should have asked to see the job. I'll remember that. Thanks for the suggestion. Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Paul Gilmartin Sent: Monday, June 17, 2019 9:10 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Is there any way to convert RECFM=U to RECFM=V with a utility or script? On Tue, 18 Jun 2019 00:31:31 +0000, Farley, Peter x23353 wrote: >Finally got my mount issue straightened out and got to try your suggestion. >IDCAMS REPRO gave errors trying to copy to the Unix output file, but IEBGENER >worked just fine. > >This did not work: > >//STEP0100 EXEC PGM=IDCAMS >//SYSPRINT DD SYSOUT=* >//INP DD DISP=SHR,DSN=weird.recfmu.file, >// RECFM=U,LRECL=222,BLKSIZE=222 >//OUT DD PATH='/tmp/TMPFILE', >// FILEDATA=TEXT,PATHDISP=(KEEP,DELETE), >// PATHOPTS=(OWRONLY,OCREAT) >//SYSIN DD * > REPRO INFILE(INP) OUTFILE(OUT) REUSE >// My experience is that IDCAMS requires DCB information on both INP and OUT. It will not copy as IEBGENER does. However, it will convert the format if the information is available. >IEBGENER with similar JCL works though: > >//STEP0100 EXEC PGM=IEBGENER >//SYSPRINT DD SYSOUT=* >//SYSUT1 DD DISP=SHR,DSN= weird.recfmu.file, >// RECFM=U,LRECL=222,BLKSIZE=222 >//SYSUT2 DD PATH='/tmp/TMPFILE', >// FILEDATA=TEXT,PATHDISP=(KEEP,DELETE), >// PATHOPTS=(OWRONLY,OCREAT) >//SYSIN DD DUMMY >//* >//STEP0200 EXEC PGM=IEBGENER >//SYSPRINT DD SYSOUT=* >//SYSUT1 DD PATH='/tmp/TMPFILE', >// FILEDATA=TEXT,PATHDISP=(DELETE,KEEP), >// PATHOPTS=(ORDONLY), >// RECFM=V,BLKSIZE=254 >//SYSUT2 DD DISP=(NEW,CATLG,CATLG), >// DSN=not.weird.vb.copy, >// UNIT=SYSDA,SPACE=(CYL,(20,20),RLSE), >// DSORG=PS,RECFM=VB,LRECL=254,BLKSIZE=0 >//SYSIN DD DUMMY >//* What happens if you coalesce the steps and omit the UNIX temp file? I wonder where it gets LRECL for STEP0200 SYSUT1? -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN