CSCI 360 Lab Training

The purpose of this lab session is to introduce you to TSO so that you will be able to submit and run Assembly language programs throughout the semester.

Open the QWS3270 or TN3270 emulator from the start menu.

QWS3270: Once a black screen appears, select the “Connect” option from the upper left hand corner. Once the dialog box opens, enter the following values and then select “Ok”:
TN3270: Enter the following values in the dialog box that appears and then select “Connect”:

Host: zos.kctr.marist.edu
Port: 1023

After you have successfully connected to the marist system, you will see a welcome screen with a flashing cursor. Type in “L TSO” (no quotes).

You should now be at the screen to enter your id number. This is where you will type in the KC-id that was provided by your instructor. Press Enter.

A new screen should appear with an option to enter your password. Your initial password is the same as your KC-id number. After you have typed in the initial password, tab over to the New Password option and enter a new password. It must be *EXACTLY* 8 characters in length and made up of letters and digits. Press Enter. You will then be prompted to re-enter your new password. Do so and press Enter again.

After the 3 asterisks, type ispfinit if this is the first time that you've logged in to TSO or just ispf if you have logged in before. Press Enter.

Congratulations! You are now fully logged on to the marist system.

Before you can start to write an Assembly language program, you must first create a data set that will hold all of your programs. To do this, select option 3 (Utilities) from the ISPF Primary Option Menu by typing 3 after the Option ===>. Press Enter. You should now be at the Utility Selection Panel. Enter option 2 (Data Set) after the Option ===>. Press Enter

On the Data Set Utility screen, use the Tab key or the mouse to move to the different fields:

Once all of the information has been entered, press Enter.

On the Allocate New Data Set screen, enter the following values:

Space Units TRKS
Primary Quantity 10
Secondary Quantity 10
Directory Blocks 10
Record Format FB
Record Length 80
Block Size 4000
Data Set Name Type PDS

Leave the other options with the default values. Press Enter. You should now see the message “Data Set Allocated” in the upper right hand corner.

Now lets allocate a second data set that can be used to hold output files. On the Data Set Utility screen, again, use the Tab key or the mouse to move to the different fields:

Once all of the information has been entered, press Enter.

On the Allocate New Data Set screen, enter the following values:

Space Units TRKS
Primary Quantity 10
Secondary Quantity 10
Directory Blocks 10
Record Format VB
Record Length 134
Block Size 4000
Data Set Name Type PDS

Leave the other options with the default values. Press Enter. You should now see the message “Data Set Allocated” in the upper right hand corner.

At the Option ===> prompt, type =2. The Edit Entry Panel screen will appear. For Project, enter your KC-id number. For Group, enter the group name that you used previously (CSCI360). For Type, enter the library name that you used previously (ASSIGNS). For Member, pick a file name – you can name your programs whatever you would like but for today, use LAB. Press Enter.

You should now be at the editing screen. Continually press the Tab key or use the mouse until you are to the right of the first line of …... This is the first line of your file.

Type in the following program:

NOTE: After typing the first line of the program and pressing Enter, it's possible that the BOTTOM OF DATA line of stars will appear. If this happens, use the mouse and click on the line number next to the first line (most likely 0001000), place an 'I' (no quotes) anywhere in the number and press Enter, this will allow you to 'Insert' data.

Make sure to make the following replacements in the code:

//your_id JOB ,'your name',MSGCLASS=H
//STEP1 EXEC PGM=ASSIST
//STEPLIB DD DSN=KC02293.ASSIST.LOADLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
********************************************
* EXAMPLE PROGRAM
********************************************
MAIN     CSECT
         USING MAIN,15
         SR    3,3     ZERO FOR TOTAL
         SR    4,4     ZERO FOR COUNTER
         XDUMP
         BR    14
         END   MAIN
/*
//

The //, *, MAIN, and /* should all start in column 1. The USING, SR, XDUMP, BR, and END should all start in column 10. The MAIN (after USING), 3, 4, 14, and MAIN (after END) should start in column 16. Use the space bar to line up the information. DO NOT USE TAB.

After the program is typed in, use the mouse to go to COMMAND ===> and type in SAVE. Your dataset should now be saved. It is also a good idea to get into the habit of saving your program as you type as programs get longer.

To submit the file to run, type SUBMIT or SUB at the COMMAND===> . You should see a message toward the bottom of the screen that your JOB has been submitted. Take note of the JOB number that is inside of the parenthesis.

Press Enter to return to your code. You now have two options to get to view output: 1) press the F3 button until you return to the ISPF Primary Option menu and then select option SD (SDSF) or 2) enter =SD at the COMMAND===> prompt and press Enter.

Type OWNER followed by your KC-id number at the COMMAND INPUT prompt. Press Enter. (You only need to do this once).

Select option STATUS or ST. Press Enter. You should now see all of the tasks/jobs that are owned by you.

Find the JOB number that matches the one that was displayed when the program was submitted and type S or SE to the left of the name. Press Enter. The only difference between the two options is that SE will allow you to edit the output file.

The output produced by your Assembly code should now be open. To view the output, page down until you see your code by continuously pressing the F8 key or the Page Down key (if it works). The output of the program will be at the end of the file. It's two lines, both of which start with REGS. If you don't see the lines, something is wrong with your program and you need to go back and make changes to your program file and repeat the submission process.

If the output is correct, lets save it to the OUTPUT directory that was created earlier. If you're still viewing the output, press F3 to return to the job listing page.

If you want to save an output file, type XDC to the left of the file you want to save and press Enter. On the SDSF Open Print Data Set Panel, enter the following, making sure to use the names you chose earlier:

Verify that the file values match what was entered earlier:

Space Units TRKS
Primary Quantity 10
Secondary Quantity 10
Record Format VB
Record Length 134

Press Enter. Your output file has now been created and you should be back at the JOB listings. The file that was created can be FTP'd to your local machine if you would like to print it or view it with an editor on your local machine. We'll cover this later.

To delete an output file, put a P to the left of the jobname and follow the directions. You should make it a habit of purging your jobs when you're done looking at the output.

Once you have finished using the Marist system, press the F3 key until you get back to the ISPF Primary Option Menu. Press F3 once again. You will either exit the ISPF system and see the main TSO command line, or see the Specify Disposition of Log Data Set.

Press 2 to delete your history information about this session. The word READY should appear in the upper left hand corner. Type LOGOFF to logoff of the Marist system. It is important that you logoff when you are done. Don't just close the window.

Some TSO tidbits:

If you would like to view the files that you have on your account, from the ISPF Primary Options Menu, select option 3 (Utilities). The Utility Selection Panel should now be showing. Select option 4 (Dslist) from the menu. Press Enter. At the DSNNAME LEVEL field, type in your KC-id number and press Enter. You should now see a listing of all of the files that belong to you. There should be a bunch of files, search through the list until you see the one with the names that you entered earlier. You may have to use the F8 button to page down if there are too many files to fit on one screen.

To edit the file, type “E” (no quotes) to the left of the file name. You can either tab down to the file name or click with your mouse. The EDIT Entry Panel should now be open. Press Enter. The data set is now open.

To delete the file, type “D” (no quotes) to the left of the file name and Press Enter. The data set should have a “Deleted” message after the name.

FTP:

The output file and source code files from earlier can be FTP'd to your local machine by starting any FTP program (Filezilla, etc...). Set up a connection to Marist using the zos.kctr.marist.edu and KC-id number information from earlier. However, do not change the Port number.

For most of the FTP programs, you should see your local files on the left side of the screen and your Marist files on the right side of the screen. Find your output file (KC-id.CSCI360.OUTPUT will probably look like a folder that you can click on). After clicking on the folder, you should see a file with the same name that you entered for the “Member to Use” option above (maybe LABOUT). Transfer the file to your local machine by double clicking the file name or highlighting it and selecting the Download option.

The file is now saved on your local machine and can be opened in any editor if you would like to view or print the output. This is also the file that will be submitted to Blackboard.

Follow the same process to get your source code file.