Farbauti wrote:... Just one example: I learned that "files" are called "datasets". But then there is this 'allocate' command, that needs both files and dataset(s) defined. So what's the deal?
There is a fundamental difference between a "file" as used in *nix and Windoze: a "file" is a named stream of bytes; a "data set" is a named stream of bytes divided into one or more identifiable "records." This differentiation is most apparent with what are sometimes called text files in *nix and Windoze where what amount to records are separated by an arbitrary byte (in *nix) or bytes (in Windoze).
In some ways the TSO ALLOCATE command is confusing to everyone. It is the link between the batch JCL DD statement which is required for a program to access data sets and a TSO session. The original designers of OS/360 did not want individual programs to specify data sets dynamically for at least three reasons. First, as they envisioned it, the mechanics were quite complex; second, if individual programs did it, each program would have a different appearance because each program would go about it in a different way; and third, given the extremely limited storage resources in the original OS/360, it was not considered suitable for problem programs to litter themselves up with allocating the data they needed. Several years later, when TSO was added to OS/360, a severe subset of dynamic allocation was added, but strictly for TSO. Still later, with MVS, dynamic allocation was generalized to include almost everything that could be done in JCL allocation and made available to all programs.
This not to say everything is perfect. The documentation is in a confusing location,
Authorized Assembler Services Guide, which implies it's not available to most programs and programmers, though 99% of dynamic allocation can be used by just about anyone. Most dynamic allocation problems are documented as codes rather than plain text messages that ordinary humans have a chance of understanding. There are at least two service routines to create plain text messages. The one most commonly used is documented among TSO publications, though it can be used by batch programs very easily.
Now you were commenting on the FILE keyword in the ALLOCATE command. I have always thought it was inappropriate. It should have been DDNAME, and, in fact, at some point - I don't know when - DDNAME was added as an alias for FILE in the ALLOCATE command. In truth, DDNAME is rarely used, as most of us dinosaurs have been brainwashed, as it were, to use FILE because that's what it was in 1971 when we started using TSO. By all means, use DDNAME, though it may confuse a dinosaur reviewing your work.