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

IEBGENER in REXX : how to use JCL-allocated files other than SYSUT1 and SYSUT2

1,085 views
Skip to first unread message

Eric Loriaux

unread,
Oct 19, 2010, 9:12:12 AM10/19/10
to
I've noted people had suggested me to use IEBGENER in a previous post in order
to copy an HFS to or from a sequential file.

The purpose of the utility I'm working on is to transfer a file to HFS, then run
a utility on OMVS and transfer back the HFS result to an MVS file.

So, IEBGENER looks perfect except that I must also be able to specify the MVS
input and output files in DD statements.
Eventually, the DD may reference a TAPE catalogued in a GDG as input or output.

Anyway, I must run two times the same utility, IEBGENER, the first time to
transfer to HFS and the second to transfer back�from HFS to MVS.

But the problem is that if I could eventually impose the user to use SYSUT1 and
SYSUT2 as DD statement (SYSUT1 being the input file on MVS and SYSUT2 being the
output file on MVS)...
I will have a problem during my first run on IEBGENER (transfer of MVS to HFS)
�as SYSUT2 is supposed to be used to allocate the output while SYSUT2 is already
JCL-allocated and�I can't be freed it.

Another way of saying it is that what I'd really need is an IEBGENER where I
could possibly specify other input and output DDNAMES than SYSUT1 and SYSUT2,
which IMHO is not possible (or am I missing something ?).

Eventually, I guess a solution might be if I could possibly allocate two DDs :
INDD and OUTDD and then dynamically change the DDNAME INDD into SYSUT1 just
before doing my first IEBGENER and OUTDD into SYSUT2 juste before doing the
second.
I know this can seem a bit weird but I was just wondering if this was just
possible.

Any other solution allowing me to run an IEBGENER in REXX using as input and
output JCL allocated DDNAMES other than SYSUT1 and SYSUT2 will be just fine.

NB: please do not suggest a commercial utility as a replacement of IEBGENER.

Best regards to all of you,
Eric


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Paul Gilmartin

unread,
Oct 19, 2010, 9:22:34 AM10/19/10
to
On Oct 19, 2010, at 07:11, Eric Loriaux wrote:
>
> Any other solution allowing me to run an IEBGENER in REXX using as input and
> output JCL allocated DDNAMES other than SYSUT1 and SYSUT2 will be just fine.
>
The way to do this is described in the Utilities manual. There may
even be an example in the Rexx manual.

Dynamic allocation of GDG members is reported to be tricky.

-- gil

John McKown

unread,
Oct 19, 2010, 9:28:41 AM10/19/10
to
Do you really need a UNIX file? Or do you just need to do some data
manipulation? Have you looked at Dovetailed Technologies' "dataset
pipes"? They have two programs: fromdsn and todsn. fromdsn copies an MVS
dataset to stdout. todsn copies stdin to an MVS dataset (and can create
a new one, if needed). The product is called Co:Z and is
free-as-in-beer.

http://dovetail.com/products/dspipes.html

So you could do:

fromdsn "//'mvs.dsn'" |\
some-unix-command |\
todsn "//'some.other.dsn'"

The commands have a lot of options!

--
John McKown
Maranatha! <><

Binyamin Dissen

unread,
Oct 19, 2010, 9:29:16 AM10/19/10
to
On Tue, 19 Oct 2010 14:11:17 +0100 Eric Loriaux <eric_l...@YAHOO.FR> wrote:

:>I've noted people had suggested me to use IEBGENER in a previous post in order

Use address linkmvs with a DDNAME override.

ddlist = copies('00'x,8*4) ||, /* Skip first 4 */
LEFT(sysin_override_ddname,8) ||,
LEFT(sysprint_override_ddname,8) ||,
copies('00'x,8) ||,
LEFT(sysut1_override_ddname,8) ||,
LEFT(sysut2_override_ddname,8)
parm = ""

address "LINKMVS" IEBGENER 'PARM DDLIST'

--
Binyamin Dissen <bdi...@dissensoftware.com>
http://www.dissensoftware.com

Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

Eric Loriaux

unread,
Oct 19, 2010, 10:05:38 AM10/19/10
to
Dynamic allocation of GDG members�is not a problem and works (using BPXWDYN).
I'm only facing the problem of using JCL-allocated DDnames such as described

----- Message d'origine ----
De : Paul Gilmartin <PaulGB...@AIM.COM>
� : TSO-...@VM.MARIST.EDU
Envoy� le : Mar 19 octobre 2010, 15h 22min 06s
Objet�: Re: [TSO-REXX] IEBGENER in REXX : how to use JCL-allocated files other

Eric Loriaux

unread,
Oct 19, 2010, 10:12:00 AM10/19/10
to
Yes I really need an HFS in order to use a utility under OMVS.
But I'm looking for a solution without a third-party solution, using what's
being provided by IBM

----- Message d'origine ----

De : John McKown <joa...@SWBELL.NET>
� : TSO-...@VM.MARIST.EDU
Envoy� le : Mar 19 octobre 2010, 15h 28min 25s
Objet�: Re: [TSO-REXX] IEBGENER in REXX : how to use JCL-allocated files other

Paul Gilmartin

unread,
Oct 19, 2010, 10:17:22 AM10/19/10
to
On Oct 19, 2010, at 07:28, Binyamin Dissen wrote:
>
> :>So, IEBGENER looks perfect except that I must also be able to specify the MVS
> :>input and output files in DD statements.
> :>Eventually, the DD may reference a TAPE catalogued in a GDG as input or output.
>
Dynamic allocation of GDG members is discussed so painfully that
I suspect you'd do best to allocate all data sets with JCL DD
statements before invoking Rexx. But you'd need to use
SYSCALL spawn to invoke the UNIX utility.

> :>Any other solution allowing me to run an IEBGENER in REXX using as input and
> :>output JCL allocated DDNAMES other than SYSUT1 and SYSUT2 will be just fine.
>
> Use address linkmvs with a DDNAME override.
>
> ddlist = copies('00'x,8*4) ||, /* Skip first 4 */
> LEFT(sysin_override_ddname,8) ||,
> LEFT(sysprint_override_ddname,8) ||,
> copies('00'x,8) ||,
> LEFT(sysut1_override_ddname,8) ||,
> LEFT(sysut2_override_ddname,8)
> parm = ""
>
> address "LINKMVS" IEBGENER 'PARM DDLIST'
>

Or,

address LINKMVS 'IEBGENER PARM DDLIST' /* all names are constants. */

Apologies for my earlier terse reply which sounded uncomfortably
like RTFM. I was in a hurry. The relevant passages are:

2.5.9.2 "z/OS V1R12.0 TSO/E REXX Reference"
2.5.9.2 The LINKMVS and ATTCHMVS host command environments

A.1.2 "z/OS V1R12.0 DFSMSdfp Utilities"
A.1.2 ddname List

-- gil

Jeff Byrum

unread,
Oct 19, 2010, 10:23:20 AM10/19/10
to
See IBM utilities BPXCOPY and BPXBATCH. These are batch utilities that you can run with batch JCL. BPXCOPY copies files from the MVS side to the HFS. BPXBATCH will run a shell script or command on the OMVS side.

Also, consider a batch TSO step to execute the TSO OCOPY command. You can allocate new files on HFS with OCOPY, as well as copy existing files in either direction between MVS and HFS.

Gilbert C Cardenas

unread,
Oct 19, 2010, 10:29:03 AM10/19/10
to
I have found that SORT copy is a viable workaround for IEBGENER. And aside from the SORTIN, SORTOUT ddnames, you can add additional ddnames using the OUTFIL parameter such as SORTOF1, SORTOF2, etc.
I'm not sure how it interacts with the HFS but I have used it in various REXX routines.


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Eric Loriaux
Sent: Tuesday, October 19, 2010 9:09 AM
To: TSO-...@VM.MARIST.EDU

http://dovetail.com/products/dspipes.html

So you could do:

This e-mail (and any attachments) may contain information that is confidential and/or protected by law. Any review, use, distribution or disclosure to anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.

Eric Loriaux

unread,
Oct 19, 2010, 11:10:33 AM10/19/10
to
You're GREAT !

I even found a similar example to the one you gave, in the TSO/E REXX User's
Guide when looking for details about LINKMVS.

Thanks a lot...
This mail is also to advice people who would ignore that info to also have a
look, as the info you provided is really valuable...
And also to let you know you can consider I received all the info I needed
concerning this issue.

Regards,
Eric

----- Message d'origine ----

De : Binyamin Dissen <bdi...@DISSENSOFTWARE.COM>
� : TSO-...@VM.MARIST.EDU
Envoy� le : Mar 19 octobre 2010, 15h 28min 37s
Objet�: Re: [TSO-REXX] IEBGENER in REXX : how to use JCL-allocated files other

Eric Loriaux

unread,
Oct 19, 2010, 11:29:42 AM10/19/10
to
As explained in a previous post :

Actually it looks to me like there there's no use allocating the tape file using

BPXWDYN and then perform an OGET command, as OGET does an allocation on his own.

I know you would suggest maybe to preallocate the output dataset for OGET but
this is not possible in this case cause I'm using a tape as output.

Moreover, I don't see how I could instruct OGET to use a sequential file on tape

rather than on disk so that's by I'm using IEBGENER instead.

Regards,
Eric


----- Message d'origine ----

De : Jeff Byrum <Jeff....@ASG.COM>
� : TSO-...@VM.MARIST.EDU
Envoy� le : Mar 19 octobre 2010, 16h 23min 09s
Objet�: Re: [TSO-REXX] Re : [TSO-REXX] IEBGENER in REXX : how to use

Jeff Byrum

unread,
Oct 19, 2010, 12:00:02 PM10/19/10
to
Yes, but with OCOPY (not OGET) you are able to specify the input and output DDNAMEs:

OCOPY INDD(ddname1) OUTDD(ddname2) . . .

And if you are running this under batch TSO, "preallocating" the files just means coding a couple of JCL DD statements. I haven't tried this, but there's nothing in the doc that implies the output DD couldn't be a DISP=NEW tape dataset. OCOPY, unlike OGET, also provides an easy means of satisfying your requirement to define your own DDNAMEs.

John McKown

unread,
Oct 19, 2010, 6:23:37 PM10/19/10
to
OGET and OPUT come to mind. They are TSO commands, not UNIX commands.
According to the book & my testing, the IBM version of "cp" works with
MVS datasets too.

cp "//'mvs.dsn'" /dev/fd1 |\
some-unix-command |\
cp /dev/fd0 "//'mvs.dsn'"

On Tue, 2010-10-19 at 15:08 +0100, Eric Loriaux wrote:
> Yes I really need an HFS in order to use a utility under OMVS.
> But I'm looking for a solution without a third-party solution, using what's
> being provided by IBM

----------------------------------------------------------------------

Eric Loriaux

unread,
Oct 20, 2010, 8:28:54 AM10/20/10
to
This is quite strange, I'm probably missing something stupid but despite the
fact that I'm using the example of IBM such as in the TSO/E REXX Reference
guide, IEBGENER return code is 12 and I have message

IEC130I SYSUT1 DD STATEMENT MISSING

parm = '' /* Standard PARM, as from JCL */
ddlist = copies('00'x,8) !!, /* DDname 1 override: SYSLIN */
copies('00'x,8) !!, /* DDname 2 override: n/a */
copies('00'x,8) !!, /* DDname 3 override: SYSLMOD */
copies('00'x,8) !!, /* DDname 4 override: SYSLIB */
copies('00'x,8) !!, /* DDname 5 override: SYSIN */
copies('00'x,8) !!, /* DDname 6 override: SYSPRINT */
copies('00'x,8) !!, /* DDname 7 override: SYSPUNCH */
left('INP', 8) !!, /* DDname 8 override: SYSUT1 */
left('OUT', 8) !!, /* DDname 9 override: SYSUT2 */
copies('00'x,8) !!, /* DDname 10 override: SYSUT3 */
copies('00'x,8) !!, /* DDname 11 override: SYSUT4 */
copies('00'x,8) !!, /* DDname 12 override: SYSTERM */
copies('00'x,8) !!, /* DDname 13 override: n/a */
copies('00'x,8) /* DDname 14 override: SYSCIN */
address 'LINKMVS' prog 'PARM DDLIST'
"IEBGENER"
rc_IEBGENER = RC
SAY 'rc_IEBGENER=' rc_IEBGENER

----- Message d'origine ----

De : Binyamin Dissen <bdi...@DISSENSOFTWARE.COM>
� : TSO-...@VM.MARIST.EDU
Envoy� le : Mar 19 octobre 2010, 15h 28min 37s
Objet�: Re: [TSO-REXX] IEBGENER in REXX : how to use JCL-allocated files other

Mickey

unread,
Nov 3, 2010, 9:25:53 AM11/3/10
to
I have never had an issue with it using BPXWDYN, as long as you remember
that REXX, like JCL, retains the iteration, so t he first one you allocate
would be +1, the next would be +2.

--------------------------------------------------
From: "Paul Gilmartin" <PaulGB...@AIM.COM>
Sent: Tuesday, October 19, 2010 9:22 AM
To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] IEBGENER in REXX : how to use JCL-allocated files

0 new messages