Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copy RECFM=VBS/LRECL=X to zFS?

109 views
Skip to first unread message

Kirk Wolf

unread,
Aug 31, 2021, 12:30:36 PM8/31/21
to
Is there an IBM Utility that will do this?
Preferrable with FILEDATA=TEXT processing mode on the output file
(adding newlines at record boundaries).

Trying IEBGENER and ICEGENER both result in  013-A8

--
Kirk Wolf
Dovetailed Technologies
http://dovetail.com

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

Wolfgang Fritz

unread,
Aug 31, 2021, 12:45:23 PM8/31/21
to
Am 31.08.2021 um 18:30 schrieb Kirk Wolf:
> Is there an IBM Utility that will do this?
> Preferrable with FILEDATA=TEXT processing mode on the output file
> (adding newlines at record boundaries).
>
> Trying IEBGENER and ICEGENER both result inᅵ 013-A8
>
I think the IBM Sort should do this part. Please try it. all other have
a limt on 32k Buffer Spanned records could be more oversize.

Charles Mills

unread,
Aug 31, 2021, 12:49:03 PM8/31/21
to
Did you try OPUT?

Charles

Doug

unread,
Aug 31, 2021, 12:49:57 PM8/31/21
to
Did you try from within the z/FS?

Doug Fuerst
do...@bkassociates.net

------ Original Message ------
From: "Kirk Wolf" <ki...@dovetail.com>
To: IBM-...@listserv.ua.edu
Sent: 31-Aug-21 12:30:23
Subject: Copy RECFM=VBS/LRECL=X to zFS?

Sri h Kolusu

unread,
Aug 31, 2021, 12:50:49 PM8/31/21
to
> Is there an IBM Utility that will do this?
> Preferrable with FILEDATA=TEXT processing mode on the output file

Kirk,

If your shop has IBM File-Manager then you can use the following JCL

//STEP0100 EXEC PGM=FILEMGR
//SYSPRINT DD SYSOUT=*
//DDIN DD DISP=SHR,DSN=Your.MVS.LRECLX.Dataset
//DDOUT DD PATH='/yourdir/lreclx.copy',
// PATHMODE=(SIRWXU,SIRWXG,SIRWXO),
// PATHOPTS=(OWRONLY,OCREAT,OEXCL),
// PATHDISP=(KEEP,DELETE),FILEDATA=TEXT
//SYSIN DD *
$$FILEM DSC
/*

Thanks,
Kolusu

Charles Mills

unread,
Aug 31, 2021, 12:51:38 PM8/31/21
to
Never mind:

4. Data sets with spanned record lengths are not allowed.

Grrr. VBS is the red-headed stepchild of DFSMS.

Paul Gilmartin

unread,
Aug 31, 2021, 1:14:00 PM8/31/21
to
On Tue, 31 Aug 2021 09:50:30 -0700, Sri h Kolusu wrote:

>> Is there an IBM Utility that will do this?
>> Preferrable with FILEDATA=TEXT processing mode on the output file
>
IDCAAMS REPRO? (I haven't checked its requirements.)

As a last resort, Rexx:

Override stdin to RECFM=U and interpret the SDWs ad-hoc.

Output with CHAROUT(); separate records with '15'x.

(In the past I have reported problems mixing CHARIN() with LINEIN()
or CHAROUT() with LINEOUT(). I don't know that those have been
repaired. I doubt BPXWUNIX would be useful; don't know about
CozBATCH.)

>If your shop has IBM File-Manager then you can use the following JCL
>
I suspect the OP is an ISV and would prefer as few "if"s as possible.

>//STEP0100 EXEC PGM=FILEMGR
>//SYSPRINT DD SYSOUT=*
>//DDIN DD DISP=SHR,DSN=Your.MVS.LRECLX.Dataset
>//DDOUT DD PATH='/yourdir/lreclx.copy',
>// PATHMODE=(SIRWXU,SIRWXG,SIRWXO),
>// PATHOPTS=(OWRONLY,OCREAT,OEXCL),
>// PATHDISP=(KEEP,DELETE),FILEDATA=TEXT
>//SYSIN DD *
>$$FILEM DSC

-- gil

Kirk Wolf

unread,
Aug 31, 2021, 3:25:07 PM8/31/21
to
Gil,

You're never wrong, but rarely helpful :-)

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

Kirk Wolf

unread,
Aug 31, 2021, 4:04:12 PM8/31/21
to
Thanks, but it doesn't seem to work.  Records that are over 32752 bytes
are truncated.

FMNBB298 10 record(s) copied: 6 truncated: 0 fields truncated

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

Paul Gilmartin

unread,
Aug 31, 2021, 4:16:49 PM8/31/21
to
On Tue, 31 Aug 2021 14:23:25 -0500, Kirk Wolf wrote:
>
>You're never wrong, but rarely helpful :-)
>
Have you any constructive criticism?

>On 8/31/21 12:13 PM, Paul Gilmartin wrote:
>> On Tue, 31 Aug 2021 09:50:30 -0700, Sri h Kolusu wrote:
>> ...
>> As a last resort, Rexx:
>>
>> Override stdin to RECFM=U and interpret the SDWs ad-hoc.
>> Output with CHAROUT(); separate records with '15'x.
>>
>> [problems with] CHAROUT() with LINEOUT(). I don't know that those
>>have been repaired.
>>
I have an Email from 2009 mentioning OA27527. If there was a resolution
I haven't saved it.

Rexx EXECIO has for several releases supported RECFM=VBS.
The Ref. mentions no restrrictions concerning LREC=X. I'm skeptical;
I'm composing an RCF.

-- gil

Kirk Wolf

unread,
Aug 31, 2021, 4:27:50 PM8/31/21
to
OK Gil, you will absolutely love this.
( I swear I didn't know this until just now :-)

$ cp "//'KIRK.TEST.VBX'" /tmp/test.vbxcp
cp: FSUMF148 //'KIRK.TEST.VBX': spanned records are not supported

$ cat "//'KIRK.TEST.VBX'"  > /tmp/test.vbxcp
# works. records > 32768 are copied correctly (at least up to the 57K
one I tried)

PS> I bet that /bin/cat with a DD:MYVBX would work too!

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

Sri h Kolusu

unread,
Aug 31, 2021, 4:30:36 PM8/31/21
to
> Thanks, but it doesn't seem to work.  Records that are over 32752 bytes
> are truncated.
>
> FMNBB298 10 record(s) copied: 6 truncated: 0 fields truncated

Kirk,

Can you please try with LRECL=X in the JCL definition and also use PAD=ON
in the sysin to pad to the maximum length?

// PATHDISP=(KEEP,DELETE),FILEDATA=TEXT,LRECL=X


//SYSIN DD *
$$FILEM SET PAD=ON

Paul Gilmartin

unread,
Aug 31, 2021, 4:40:38 PM8/31/21
to
On Tue, 31 Aug 2021 13:30:17 -0700, Sri h Kolusu wrote:

>> Thanks, but it doesn't seem to work.� Records that are over 32752 bytes
>> are truncated.
>>
(Was that supposed to be an NBSP?)

>> FMNBB298 10 record(s) copied: 6 truncated: 0 fields truncated
>
>Can you please try with LRECL=X in the JCL definition and also use PAD=ON
>in the sysin to pad to the maximum length?
>
Do you *really* think that's what he wants?

For LRRECL=X, the maximum is "unlimited".

>// PATHDISP=(KEEP,DELETE),FILEDATA=TEXT,LRECL=X
>
>//SYSIN DD *
>$$FILEM SET PAD=ON
>$$FILEM DSC
>/*
-- gil

Paul Gilmartin

unread,
Aug 31, 2021, 4:51:03 PM8/31/21
to
On Tue, 31 Aug 2021 15:27:38 -0500, Kirk Wolf <ki...@DOVETAIL.COM> wrote:

>OK Gil, you will absolutely love this.
>( I swear I didn't know this until just now :-)
>
>$ cp "//'KIRK.TEST.VBX'" /tmp/test.vbxcp
>cp: FSUMF148 //'KIRK.TEST.VBX': spanned records are not supported
>
>$ cat "//'KIRK.TEST.VBX'"  > /tmp/test.vbxcp
># works. records > 32768 are copied correctly (at least up to the 57K
>one I tried)
>
Never underestimate the C/C++ RTL. I think the default is
FILEDATA(TEXT)

>PS> I bet that /bin/cat with a DD:MYVBX would work too!
>
Even though that's not documented as supported. Would you
distribute to customers code dependent on an unsupported feature?

How are attributes supplied on the DD statement merged with
attributes supplied on the "cp" command?

Charles Mills

unread,
Sep 1, 2021, 12:34:16 PM9/1/21
to
The DD:ddname format for a "legacy" dataset is a supported and documented feature of the C runtime library (even if not specifically for cat).

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin
Sent: Tuesday, August 31, 2021 1:51 PM
To: IBM-...@LISTSERV.UA.EDU
Subject: Re: Copy RECFM=VBS/LRECL=X to zFS?

Paul Gilmartin

unread,
Sep 1, 2021, 1:02:24 PM9/1/21
to
On Wed, 1 Sep 2021 09:34:07 -0700, Charles Mills wrote:

>The DD:ddname format for a "legacy" dataset is a supported and documented feature of the C runtime library (even if not specifically for cat).
>
The "cat" developers are understandably unwilling to document and
support that behavior of "cat". At very least they'd need to specify
the behavior when allocation options conflict with options on the
"cat" command. (I suppose "unpredictable" would suffice.) Bottom
line: if it breaks, either immediately or at the next release, you get
to keep both pieces.

Related: I once allocated a RECFM=VB data set, overriding to
RECFM=U and fetched it from DD:SYSUTx with FTP BINARY.
I expected to see BDWs/RDWs. Didn't. In effect, FTP used the
attributes from the DSCB and ignored the allocated attributes.
"cat" might have similarly unexpected behavior.

Charles Mills

unread,
Sep 1, 2021, 2:20:13 PM9/1/21
to
I would argue that cat should not document it, any more than the COBOL compiler doc should cover all the possible permutations of //SYSPUNCH DD ... They should reference the C library documentation and say "any of those formats."

I agree on the merging to DCB attributes.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin
Sent: Wednesday, September 1, 2021 10:02 AM
To: IBM-...@LISTSERV.UA.EDU
Subject: Re: Copy RECFM=VBS/LRECL=X to zFS?

Farley, Peter x23353

unread,
Sep 2, 2021, 12:53:30 AM9/2/21
to
But ONLY if the utility is coded to use fopen() and not open(); fopen() supports the DD:ddname syntax, open() does not.

By practical experimentation, I found that z/OS Unix awk uses fopen(). I'll bet the cat utility does too but that cp uses open().

Peter
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.

Paul Gilmartin

unread,
Sep 2, 2021, 1:42:09 AM9/2/21
to
On Thu, 2 Sep 2021 04:47:52 +0000, Farley, Peter x23353 wrote:
>
>By practical experimentation, I found that z/OS Unix awk uses fopen().
>
How can you be sure? You haven't seen the source code.

>I'll bet the cat utility does too but that cp uses open().
>
From the UNIX Command Ref. for "cp":
1. To specify an MVS data set name, precede the name with
double slashes (//). For example, to specify the fully qualified
data set names 'turbo.gammalib' and 'turbo.gammalib(pgm1)', write:
"//'turbo.gammalib'"
"//'turbo.gammalib(pgm1)'"
...
-- gil

Farley, Peter x23353

unread,
Sep 2, 2021, 2:29:16 PM9/2/21
to
Gil,

Of course I can't be sure without access to the OCO source code, but I can make an educated guess based on the C RTL implementation.

I had not investigated the command ref doc for cp, I was just responding to the OP's original issue that using cp did not work. Mea culpa.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-...@LISTSERV.UA.EDU> On Behalf Of Paul Gilmartin
Sent: Thursday, September 2, 2021 1:42 AM
To: IBM-...@LISTSERV.UA.EDU
Subject: Re: Copy RECFM=VBS/LRECL=X to zFS?

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.


0 new messages