z/OS Unix
Part One - Challenge #02

z/OS includes Unix which enables an unparalleled state-of-the-art operating system to be open, flexible, and function rich. If you are familiar with Unix or Linux, then you are familiar with z/OS Unix Services.

The challenge uses 2 separate ways to interface with z/OS Unix shell prompt

  1. TN3270 TSO/ISPF
  2. SSH

From the ISPF Primary Option Menu, launch the Unix Services command shell
Enter the following option
u

The Unix shell prompt panel appears.
Enter Unix command
ls
The command output lists the unix files in your personal directory already set up for you.

Output from Unix command ls is a list of files in the unix subdirectory.

The Unix shell prompt panel appears.
Enter the following Unix command string
echo 'write this line into a unix file named zfile' > zfile
The command output is writing the string in quotes to zfile.

Enter Unix command
who am i >> zfile
The command output is redirected and appended (>>) to the existing zfile file name.

Enter Unix command
ls

Output from ls lists the files which now includes zfile.
Enter Unix command
cat zfile
The command output writes zfile content to display

Output from cat zfile writes the content of zfile to the display which is 2 lines,
one from the echo command and another from the who am i command.

Minimize the TN3270 session. You will return to this active session shortly.

PuTTY is used in the instructions below to demonstrate an SSH connect.
If you select to use a different SSH client, then expect screens to be slightly different


Use PuTTY to establish an SSH session with z/OS as shown below.

Session establishment requires Yes to trust server's key fingerprint

**Remember you must substitute your ID replacing z99999 in all instructions that follow.

Once presented with login as:, then authenticate with the same ID and password credentials used to access TSO/ISPF

Successful authentication will present the Unix shell prompt.

SSH key entry can be fussy.
  Example, backspace may not behave properly. So, if SSH key entry
  returns a strange message, please try again without any backspaces.

Enter the following Unix command to list files in the present working directory -
ls
Only zfile is displayed as it was from the TN3270 Unix prompt

Enter the following to write zfile to the display.
cat zfile


**NOTE: In some cases, the output of the who am i is longer than 80 characters resulting in errors in this challenge. If this happens to you, ignore the problem and enter scorep1 now to get credit for completing part 1.

The zfile output is displayed below.

Enter the following command to append output about the SSH session to zfile.
who am i >> zfile

To make this next action work -
  Be sure to exit F3 any TN3270 edit session within your PDS.DATA data set
  If the copy continues to fail, then logoff your TN3270 session
  The copy command can only work when your PDS.DATA is free for an exclusive update by SSH session

**Remember you must substitute your ID replacing z99999 below

Enter the following to copy zfile to member zfile in z99999.pds.data.
cp zfile "//'z99999.pds.data(zfile)'"

Enter following command to terminate the SSH session.
exit

Maximize the TN3270 session and enter following Unix services command.
exit

A session has ended message is displayed.
Enter will return the session to ISPF panel.

From ISPF panel enter
=3.4
= tells ISPF to behave as if on the Primary Option Menu.
3.4 will jump directly to the Utilities Data Set List Panel

=3.4 jumps directly to the Utilities Data Set List Panel regardless of which ISPF panel is currently displayed.

The point is that the ISPF panel does NOT need to be the Primary Option Menu to jump directly to a desired ISPF panel, the 3.4 panel in this case.

Enter the following in the Dsname Level field, substituting your ID for z99999.
z99999.pds.data

Browse b your partitioned data set, pds.data as shown below

Select s member ZFILE to browse.

Content of member ZFILE is displayed.

F3 to exit and return to previous ISPF panel.

Next: Completing Part One