-Original Message- From: IBM Mainframe
> Discussion List On Behalf Of Farley, Peter Sent: Friday, May 5, 2023 5:58 PM
> To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL to dynamic DD name EXTERNAL
> EMAIL That logic is fine for SWA below the line, but I don
:58 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
EXTERNAL EMAIL
That logic is fine for SWA below the line, but I don't think many shops still
run that way, at least not the larger ones.
ISTR there was at one time a published Rexx implementation of the SWA-above
logic
to Enterprise COBOL.
Peter
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
rpinion865
Sent: Friday, May 5, 2023 2:00 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: COBOL to dynamic DD name
I don't know if this program is of any use to the original poster. But, I came
COBOL to dynamic DD name
I don't know if this program is of any use to the original poster. But, I came
across the source this afternoon. It would seem if you can read the JFCB, maybe
you could update it?
IDENTIFICATION DIVISION.
PROGRAM-ID. COBJFCB.
INSTALLATION.
AUTHOR. KEVIN.
DATE-WRITTEN. 11/0
I don't know if this program is of any use to the original poster. But, I came
across the source this afternoon. It would seem if you can read the JFCB, maybe
you could update it?
IDENTIFICATION DIVISION.
PROGRAM-ID. COBJFCB.
INSTALLATION.
AUTHOR. KEVIN.
DATE-WRITTEN. 11/07/2005.
ENVIRONMENT
ve an easy way to do what I want in z/OS COBOL but not
in Micro Focus COBOL!
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Steve Thompson
Sent: Monday, May 1, 2023 12:24 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
Whose COBOL are you using
: IBM Mainframe Discussion List On Behalf Of
Farley, Peter
Sent: Friday, April 28, 2023 3:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
I don't think you can do that. Unfortunately COBOL does not yet support actual
FILE-type variables. COBOL files are essentially
with the file name (e.g.
output-file) and the desired dd name.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Schmitt, Michael
Sent: Monday, May 1, 2023 9:39 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
That's an interesting idea: add a nested
in the program, or assembler
assists, etc.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Schmitt, Michael
Sent: Friday, April 28, 2023 2:38 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: COBOL to dynamic DD name
I know how to have a COBOL program on z/OS use a data set
>> SORT would be tricky to only write the header record once per file, and to
>> resequence the records.
Michael,
Not really. There are ways to get around it. Here is a sample job of writing
to 2 files. You can expand that to “n” number of files.
//STEP0100 EXEC PGM=SORT
//SYSOUT DD
>> The data I'm trying to write is mixed up in an input file, so I don't know
>> which DDs I need to write to until I get there.
You Code for ALL the ddnames possible and open them and write to them based on
the file indicator.
>> I know that I could change the program to do an internal sort,
SELECT specifies the COBOL FILE name to be ASSIGNED to a DDNAME. The FILE name
is then used in an FD to nominate the I/O area(s).
There is no dynamic SELECT that I am aware of. You have to use some form of
SVC99. BPXWDYN can be used for this purpose.
SORT would be tricky to only write the header record once per file, and to
resequence the records.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Mike Schwab
Sent: Friday, April 28, 2023 10:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
Requirement is for COBOL; that's what the end-state program will be.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Andrew Rowley
Sent: Friday, April 28, 2023 8:18 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
On 29/04/2023 6:29 am, Schmitt
Requirement is for COBOL.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Seymour J Metz
Sent: Friday, April 28, 2023 5:49 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
How many different files does he have? An equivalent to the PL/I FILE
On Behalf Of Sri
h Kolusu
Sent: Friday, April 28, 2023 4:00 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
>> The OP isn't trying to retrieve the information; he's trying to open a file
>> using a dynamic ddname. Put another way, he wants to open the same DCB
>&
name to the DCB again.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Charles Hardee
Sent: Friday, April 28, 2023 3:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
*I have not tried this*, but could you use SET FILE-VAR TO ADDRESS OF
FILE-NAME
Yeah, the File Manager solution is slick, but the end state won't be running on
z/OS.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of Sri
h Kolusu
Sent: Friday, April 28, 2023 3:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
>> Now
Mainframe Discussion List On Behalf Of
Seymour J Metz
Sent: Friday, April 28, 2023 3:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
Is PL/I an option at your shop?
From: IBM Mainframe Discussion List on behalf of
Schmitt, Michael
All are VB
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of Sri
h Kolusu
Sent: Friday, April 28, 2023 3:38 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
>> So use it to retrieve the data set name that is allocated in the JCL to the
*can* write to dynamic DD names.
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Farley, Peter
Sent: Friday, April 28, 2023 3:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
I don't think you can do that. Unfortunately COBOL does not yet
to dynamic DD name
On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael wrote:
>I know how to have a COBOL program on z/OS use a data set name that isn't
>determined until runtime, via an environment variable. My question is can you
>use one file (i.e. one select/assign and one FD)
As suggested, simply define four output files, open them, and then write to
them based on the data in the input file record, perhaps using an EVALUATE
statement. Opening them all at the start of your program has another
advantage: if you open only one output at a time and loop between them,
-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
[CAUTION: This Email is from outside the Organization. Unless you trust the
sender, Don’t click links or open attachments as it may be a Phishing email,
which can steal your Information and compromise your Computer.]
I have an input file
Classification: Confidential
If the JCL has all of the DD's defined. Just open/close the requested file(s)
as needed. No need for dynamic ddname.
>> I'm not trying to allocate the files. The JCL for the step has all the DDs.
>> I just need to be able open, extend, and close the select/assign
COBOL does NOT demand a DSNAME. It is perfectly happy with DDNAMEs.
There were extensions to COBOL to allow a DSNAME via a system variable by
playing with the SELECT statement.
Of course, one could ask if the dsname is already in a system variable, why
not supply it in the JCL. But I digress.
al Message-
From: IBM Mainframe Discussion List On Behalf Of
Charles Hardee
Sent: Friday, April 28, 2023 4:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
*I have not tried this*, but could you use SET FILE-VAR TO ADDRESS OF FILE-NAME?
Does that make FILE-VAR point
On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael wrote:
>I know how to have a COBOL program on z/OS use a data set name that isn't
>determined until runtime, via an environment variable. My question is can you
>use one file (i.e. one select/assign and one FD) to write to different DD
On Sat, 29 Apr 2023 13:51:00 +1000, Andrew Rowley wrote:
>
>Fair point... although I would contend that a Java program without
>comments is easier to understand than DFSORT control statements!
>
Yes. It appears as if the specifier of DFSORT control statement syntax
was traumatized in utero by CMS
On 29/04/2023 11:48 am, Paul Gilmartin wrote:
Obviously a complete Java program needs very few comments.
Fair point... although I would contend that a Java program without
comments is easier to understand than DFSORT control statements! Here is
a version with comments (again, untested):
I've seen several uses of sort to split a file into multiple output files.
On Fri, Apr 28, 2023 at 2:38 PM Schmitt, Michael
wrote:
>
> I know how to have a COBOL program on z/OS use a data set name that isn't
> determined until runtime, via an environment variable. My question is can you
>
On Fri, 28 Apr 2023 20:40:37 +, Seymour J Metz wrote:
>The OP isn't trying to retrieve the information; ...
>
>
>From: Sri h Kolusu
>Sent: Friday, April 28, 2023 4:26 PM
>
>As steve mentioned in earlier post , you can BPXWDYN2 to retrieve the info a
On Sat, 29 Apr 2023 11:17:39 +1000, Andrew Rowley wrote:
>...
>A complete Java program:
>
Obviously a complete Java program needs very few comments.
--
gil
--
For IBM-MAIN subscribe / signoff / archive access
On 29/04/2023 6:29 am, Schmitt, Michael wrote:
I have an input file that contains thousands of records. They are in groups:
header record, then a bunch of segments all for one database name, then another
header, records for another database. But the same database can appear more
than once in
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
>> The OP isn't trying to retrieve the information; he's trying to open a file
>> using a dynamic ddname. Put another way, he wants to open the same DCB
>> multiple times, with a different DCBDDNAM each time.
SeyMour
On Fri, 28 Apr 2023 20:26:38 +, Sri h Kolusu wrote:
>...
>Here is an example
>
>https://www.mvsforums.com/helpboards/viewtopic.php?p=62866#62866
>
Thanks. I think I see how that works. Trying to understand it, I found a
contradiction in the REXX UNIX Ref. I submitted an RCF.
--
gil
>> The OP isn't trying to retrieve the information; he's trying to open a file
>> using a dynamic ddname. Put another way, he wants to open the same DCB
>> multiple times, with a different DCBDDNAM each time.
SeyMour
>From the limited information that OP provided, IMHO he was planning on
*I have not tried this*, but could you use SET FILE-VAR TO ADDRESS OF
FILE-NAME?
Does that make FILE-VAR point to the DCB?
If so, then, with the file closed, move in your DD name, open, write, close.
Rinse and repeat.
Like I said, I don't know if this will work, but it's worth a try.
Chuck
On
h Kolusu
Sent: Friday, April 28, 2023 4:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
>> I'm not trying to allocate the files. The JCL for the step has all the DDs.
>> I just need to be able open, extend, and close the select/assign to
>> differe
>> Now we're trying to replace the File Manager step. If it was possible to do
>> this in z/OS COBOL we could use it, but it isn't worth a large effort
>> because it would be an interim solution anyway.
Michael,
Not sure as to why you want to replace file manager step with a COBOL program,
>> So use it to retrieve the data set name that is allocated in the JCL to the
>> DD, then use the environment variable method to write to that same data set
>> name? Hmmm.
Michael,
Not really, once you get the Dataset name, you can open it in EXTENDED mode
and write the output. However,
Is PL/I an option at your shop?
From: IBM Mainframe Discussion List on behalf of
Schmitt, Michael
Sent: Friday, April 28, 2023 4:29 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
I have an input file that contains thousands
nightmare, so I dropped that effort.
HTH
Peter
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Schmitt, Michael
Sent: Friday, April 28, 2023 3:38 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: COBOL to dynamic DD name
I know how to have a COBOL program on z/OS use a dat
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
>> I'm not trying to allocate the files. The JCL for the step has all the DDs.
>> I just need to be able open, extend, and close the select/assign to
>> different DDs where which ones I use and which order is n
List On Behalf Of Tom
Marchant
Sent: Friday, April 28, 2023 3:18 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
I don't know any Cobol syntax that would change the DDNAME in a DCB, but you
could call an assembler routine to change the DDNAME before OPEN. Why would you
want
>> I'm not trying to allocate the files. The JCL for the step has all the DDs.
>> I just need to be able open, extend, and close the select/assign to
>> different DDs where which ones I use and which order is not known until I'm
>> working through an input file.
Michael,
As steve mentioned in
I don't know any Cobol syntax that would change the DDNAME in a DCB, but you
could call an assembler routine to change the DDNAME before OPEN. Why would you
want to do that?
I'm a bit baffled. In z/OS and its ancestors, the data set name isn't
determined until runtime, via JCL.
Perhaps if you
: Friday, April 28, 2023 3:08 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL to dynamic DD name
You may want to use BPXWDY2. It dow not require the setting of
R0. And it does almost everything that BPXWDYN does.
Steve Thompson.
PS. Speaking of RCFS, this is one I did an RCF about and I
understand
You may want to use BPXWDY2. It dow not require the setting of
R0. And it does almost everything that BPXWDYN does.
Steve Thompson.
PS. Speaking of RCFS, this is one I did an RCF about and I
understand there are some updates being done to/with the DOC for
examples.
On 4/28/2023 3:52 PM,
On Fri, 28 Apr 2023 19:37:39 +, Schmitt, Michael wrote:
>I know how to have a COBOL program on z/OS use a data set name that isn't
>determined until runtime, via an environment variable. My question is can you
>use one file (i.e. one select/assign and one FD) to write to different DD
I know how to have a COBOL program on z/OS use a data set name that isn't
determined until runtime, via an environment variable. My question is can you
use one file (i.e. one select/assign and one FD) to write to different DD
names, that were already allocated in the JCL?
I can't find a way,
51 matches
Mail list logo