Thursday, October 22, 2015

Z/OS Unix System Services - II

OMVS provides a shell interface where you can type UNIX commands, as shown in below figure.



By default, you type commands close to the bottom, at the ===> prompt (it is possible to configure OMVS to place the ===> prompt at the top instead).

Can we do our "Hello, World" example as a z/OS UNIX program? Sure! Let's do it in the C programming language. Start by using OEDIT, which is the ISPF editor for z/OS UNIX:

You are now in an editor that is very similar to the editor that you used to edit your JCL. This time, enter the "Hello, World" program, as shown in the below figure. 

Now compile and execute the program:

c89 –o test test.c

./test

If the compiler fails, type exit from OMVS and LOGOFF from TSO.
Then when you log back on, type 2096128 in the size field of the TSO logon panel.

Note that the C compiler is a separate product from OMVS, and your site might not have it.


When you are done with OMVS, use exit to leave it.

No comments:

Post a Comment