How to start on a mainframe?



How to start on a mainframe?

Postby Farbauti » Mon Feb 12, 2018 7:11 pm

Hi there,

I work in IT more than 20 years now, but only recently I got in touch with mainframes.
Perhaps I'm too much into windows/linux thinking but it's hard for me to get used to MVS/zOS.

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?

I know I lack lots of fundamentals, so my question in general is: Can anyone point me to good introduction documentation? For self study at best.
I have access to a toybox mainframe, but I need some guidance first ;)

Cheers,
Tom
Farbauti
 
Posts: 1
Joined: Mon Feb 12, 2018 6:45 pm
Has thanked: 2 times
Been thanked: 0 time

Re: How to start on a mainframe?

 

Re: How to start on a mainframe?

Postby enrico-sorichetti » Mon Feb 12, 2018 7:49 pm

cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
Farbauti (Tue Feb 13, 2018 12:35 am)
enrico-sorichetti
Global moderator
 
Posts: 2663
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 134 times

Re: How to start on a mainframe?

Postby steve-myers » Mon Feb 12, 2018 8:38 pm

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.

These users thanked the author steve-myers for the post:
Farbauti (Tue Feb 13, 2018 12:35 am)
steve-myers
Global moderator
 
Posts: 1897
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 200 times

Re: How to start on a mainframe?

Postby steve-myers » Mon Feb 12, 2018 9:23 pm

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.
steve-myers
Global moderator
 
Posts: 1897
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 200 times


Return to Stupid Questions

 


  • Related topics
    Replies
    Views
    Last post