If I understand you right, a variable is not a DDname. DD names provide 
indirection. The programmer opens MYFILE1; JCL maps MYFILE1 to SYS1.FOO.BAR 
today, and to SYS2.WIDGET.CNTL tomorrow. (Or ALLOC or SVC 99, but SVC 99 is 
really outside of the original vision -- putting the true file name into the 
code or the code process.)

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Paul Gilmartin
Sent: Friday, January 7, 2022 9:02 AM
To: [email protected]
Subject: DDNAMEs (was: Python ... REXX)

On Thu, 6 Jan 2022 21:13:16 -0800, Tom Brennan wrote:
>    ...
>Maybe a bigger issue is with non-mainframe folks wondering why JCL is
>there in the first place.  I started with microcomputers, programming
>things in BASIC where we were told to hard-code full filenames in the
>program itself.  Already I could see how silly that would be in
>production, having to change the source code just to work with different
>files.  
>
Does BASIC not support variables as filenames?  (I'm BASIC-naive.
Does BASIC have a string data type?)

CMS is an abomination.  There are different macros for I/O to:
disk; tape; terminal; card; printer; ...  However silly, you must
change the source code.  CMS Pipelines sort of solved that
shortcoming with driver stages, at the expense of sacrificing
support of Classic CMS utilities which are Pipelines-unfriendly.

Likewise Rexx, which provides PARSE PULL and SAY rather
than STREAM I/O to the terminal.

And TSO, which provides TGET and TPUT rater than QSAM I/O
to SYSTSINI and SYSTSPRT.

And Assembler, with WTO rather than QSAM output to a console
device.  (But: "allocate dd(SYSTERM) path('/dev/console')"  )

>Unix solved that in clever ways with parameter passing, stdin,
>and things like that which work well in shell scripts.  
>
But inconsistently.  Some commands such as, "zip" put the
output file first.  Others, such as "cp" put the output file last.
Yet others use keyword options, "if=" and "of=". And input
to "tee"or output from "cat" can only be a descriptor.  It's a
glorious chaos!

>Mainframes solved it with 8 character DD names and 
>JCL redirection.
>
Not entirely solved.  There's still sometimes a need for an
alternate DDNAME list:
<https://www.ibm.com/docs/en/zos/2.5.0?topic=lists-ddname-list>,
like UNIX, but putting file handles, not filenames in an argument list.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to