z13 and z14 system hardware, I/O and storage technologies, memory and task management, virtualization and cloud computing, hands-on SDSF system information, JCL, Putty and USS

ALexshmny7
Assignment2Hands-onSummer2018.docx

Contents 1.0 Using SDSF and Getting System Information 6 1.1 Documenting CPU Information 6 1.1.1 Windows CPU Information - System Properties, WMIC and SYSINFO 6 1.1.2 Linux CPU information- lscpu, /proc/cpuinfo and lstopo (hwloc) 8 1.1.3 z System CPU Information SDSF /D M=CPU 9 1.1.4 Documenting z System CPU information 10 1.2 Documenting Virtual Memory Paging Information 10 1.2.1 Windows Page information – Performance Options/Virtual Memory 11 1.2.2 Linux Page information – swapon and free commands 12 1.2.3 Questions – Virtual Memory 12 1.2.4 Documenting z System Page Data sets - SDSF /D ASM 13 1.2.5 Changing the Size of the z System Page Datasets 13 1.3 SDSF OWNER and PREFIX Filters 14 1.4 Documenting current logon TSO users - SDSF DA Command 15 1.5 Sysplex Not Active Error Message 15 1.6 Security Implications of Multiuser Logon Sessions – Session Hijacking 17 1.7 SDSF Status (ST) Command 17 1.7.1 SDSF EXECUTION Job Status 17 1.7.2 SDSF PRINT Job Status 17 1.7.3 Infinite Loops - Batch programs that display a job status of EXECUTION 18 1.7.4 Questions – Job Status (PRINT and EXECUTION) 18 1.8 Job or Process Priorities 19 1.8.1 z/OS Job Priorities and Initiators 19 1.8.2 Windows Processes and Priorities 20 1.8.3 Linux Processes and Priorities – ps, nice and renice commands 20 1.8.4 Documenting z System Job Priorities 21 1.8.5 Questions - SDSF Status Filter Line – PREFIX, OWNER, and Wildcard characters 22 1.9 DB2 Subsystem 24 1.9.1 Documenting the DBAG or DB2 Subsystem jobs 24 1.9.2 Questions – DBAG or DB2 Subsystem 24 1.9.3 What is a z System Job Class? 26 1.10 CICS Subsystem 27 1.10.1 Documenting CICS Subsystem Jobs 27 1.10.2 Using the SDSF PREFIX Command - More Examples 28 1.11 Documenting ALL JOBs (/$DA,X) 29 1.11.1 Using ULOG 29 1.11.2 How do I turn ULOG off? 30 1.11.3 Forward Slash (/), Forward Slash- Dollar Sign and No Prefix Commands 31 1.12 Review Questions – Window and Linux Status information 32 2.0 ISPF and ISPF Editor 33 Video - ISPF Productivity Tool Overview Part 1 33 Video - ISPF Productivity Tool Overview Part 2 33 2.1 ISPF overview 33 2.2 ISPF Menu Structure 33 2.3 Standard 3270 ISPF Keyboard Mapping 36 2.4 Using the ISPF Editor to create a new PDS Member – a Short-cut 39 2.5 Using ISPF Edit Line Commands 41 Video - Option 3.4 DSLIST Panel - Browse View Edit Rename Delete (14) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Display Dataset Properties Line Command (15) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Edit Mode Insert (I) Line Command (22) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Edit Mode Repeat (R) Line Command (23) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Edit Mode Delete (D) Line Command (24) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Edit Mode- Exclude (X) Line Command (25) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Edit Copy (C) Line Command (26) (Kumar IT Channel) 42 Video - Option 3.4 DSLIST Edit Move (M) Line Command (27) (Kumar IT Channel) 42 Video -Option 3.4 DSLIST Edit Upper/Lower Case (UC/LC) Line Command (28) (Kumar IT Channel) 42 2.5.1 Insert Line Command 43 2.5.2 Primary Command: RENUM 43 2.5.3 Copying Line(s) 44 2.5.4 Repeating Lines 45 2.5.5 Moving Lines 46 2.5.6 Copying Lines 46 2.5.7 Documenting ISPF Editing Requirements 1 47 2.5.8 Deleting Lines 49 2.5.9 Primary Command: Displaying Columns 50 2.5.10 SHIFTING COLUMNS 51 2.6 Split Screen (F2) 52 2.7 Primary Command: PFSHOW 53 2.8 Changing the Scroll Value 53 2.9 Primary Commands: LOCATE (L) or FIND (F) 54 2.10 Primary Commands: CHANGE (C ) 54 Video - Option 3.4 DSLIST Edit Show Columns (COLS) Primary Command (29) (Kumar IT Channel) 54 Video - Option 3.4 DSLIST Edit CAPS ON Primary Command (30) (Kumar IT Channel) 54 Video - Option 3.4 DSLIST Edit FIND String Primary Command (31) (Kumar IT Channel) 54 2.11 Questions – Functions, primary or line commands. 55 Video - Option 3.4 DSLIST Edit Important Function Keys 31 (Kumar IT Channel 55 2.12 Documenting ISPF Editing Requirements 2 56 2.13 ISPF HILITE Command 56 3.0 - JCL Utilities, Procedures, Substitution Variables and PROC Overrides 57 Video - JCL Lecture Part 1 Basics (Kumar IT Channel) 57 Video - JCL Lecture Part 2 JOB CARD, JCL standards, POSITIONAL, KEYWORD PARAMETER (Kumar IT Channel) 57 Video - z/OS Job Control Language (JCL) - Part-6 57 JCL Lecture Part 3 PARM, SYSIN DD * (Kumar IT Channel) 57 JCL Lecture Part 4 DD Statement (Kumar IT Channel) 57 3.1 IBM Utilities 58 Video - IBM JCL Utilities (Tutorials Point Series) 58 Video - IBM JCL Utilities Text Link (Tutorials Point Series) 58 Video - JCL SORT and MERGE Utilities (Tutorials Point Series) 58 Video- JCL SORT Text Link (Tutorials Point Series) 58 Video JCL Lecture Part 5 IBM Utilities (Kumar IT Channel) 59 Video - JCL Lecture Part 6, PS, PDS & important IBM utilities, parameters in JCL (Kumar IT Channel 59 Video - JCL Hands-on Part 3 Using the IEFBR14 utility to allocate and delete PS, PDS, or temporary data set (Kumar IT Channel) 59 Video - JCL Hands-on Part 4 Using the IEBGENER to copy physical sequential data sets (Kumar IT Channel) 59 Video - JCL Hands-on Part 5 Using the IEBCOPY to copy, merge or compress partitioned data sets (Kumar IT Channel) 59 3.2 Introduction JCL Sorting 61 3.2.1 Document RMUXXXX.JCL(AREACODE) 61 3.2.2 Coding and Executing MYSORT to Sort by Area Code 62 3.2.3 Questions – SORTIN and SYSOUT 64 3.1.4 Document MYSORT by Zipcode 66 3.3 Code, Execute and Document MYSORT to Sort by State 66 3.4 MRCREM JCL - Using IEBGENER to Create a Dataset Member 67 3.4.1 Questions – IEBGENER, Dummy, SYSPRINT and SYSUT2 68 3.4.2 Document MYCREM JCL Output 70 3.5 Three Methods to COPY A PDS MEMBER 71 3.5.1 Use the ISPF MOVE/COPY utility. 71 3.5.2 Use the IEBGENER utility. 71 3.5.3 Use the ISPF Edit COPY primary command. 71 3.6 MYPROCI – Code, Execute and Document an Instream data JCL PROCEDURE 72 Video - JCL Procedures – PROCS (Tutorials Point Series) 72 Video - 6.5.2 JCL Procedures Text Link (Tutorials Point Series) 72 Video -6.5.3 JCL Tutorial Part 7 Procedures (Kumar IT Channel) 72 3.6.1 Code the MYPROCI Procedure 72 3.6.2 Document MYPROCI – Coding an Instream JCL Procedure 74 3.7 MYPROCC – Coding a Catalog JCL Procedure 74 3.8 MYPCALL – Calling a Catalog JCL Procedure 76 3.8.1 JCLLIB Statement 77 Video - JCL Libraries (Tutorials Point Series) 77 Video - JCL Libraries Text Link (Tutorials Point Series) 77 Video - JCL Hands-on JCLIB and STEPLIB (Kumar IT Channel) 77 3.8.2 Document the Execution of MYPCALL (Procedure Call) 78 3.9 MYPROCO – Overriding a Catalog JCL Procedure 78 3.9.1 Difference between Substitution Variables and PROCEDURE OVERRIDES 80 3.9 Questions - JCL Procedure Review 80 4.0 Introduction to z/OS UNIX System Services (USS) and zLinux 82 4.1 Questions – UNIX and UNIX System Services 84 4.2 Advantages of z Systems UNIX System Service Compared of UNIX operating systems 85 4.3 Questions - OVMS 85 4.3 OEDIT - Creating and editing a file in OMVS? 87 4.4 Linux / UNIX: Rules For Naming File And Directory Names 88 4.5 Document OBROWSE command 88 4.6 Document UNIX cat Command 89 4.7 Document UNIX Commands 89 4.8 Explain UNIX Commands 90

Enter your Name Here

1.0 Using SDSF and Getting System Information

How to get system Information of a Mainframe? http://www.longpelaexpertise.com/ezine/InfoFromzOS.php

1.1 Documenting CPU Information

1.1.1 Windows CPU Information - System Properties, WMIC and SYSINFO

In Windows, one can review the Window's System Properties under the Control Panel to determine processor and other information. For example, my laptop provides the following system information concerning the processor type, processor speed and the amount of installed RAM.

Summer 2018

One can use the Windows command WMIC to display the processor serial number used to uniquely identity your processor and is used for auditing and licensing purposes.

The processor serial number and type of computer is often used to automatically name your computer in Windows.

Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating systems. WMIC extends WMI for operation from several command-line interfaces and through batch scripts. For more information concerning the WMIC command interface consult the following links

WMIC - Take Command-line Control over WMI - https://msdn.microsoft.com/en-us/library/bb742610.aspx

Video - Windows Management Instrumentation Tutorial #1 Introduction - https://www.youtube.com/watch?v=V4vdwAD3aJ0

Video - WMIC - Command Line - Windows 7 - https://www.youtube.com/watch?v=vrmKepZZn1c

Video - WMI Accessing Hard Drive Information using .NET - https://www.youtube.com/watch?v=f4GbaWxn4iI

Windows will permit you to run the systeminfo command at the command prompt to display more system information. For example:

Notice the detailed system information. Take notice of the Windows hotfix(s) or operating system patches applied to this example. Have you ever seen some similar displayed, e.g., KB2764913, KB2764916, etc., before in a z/Enterprise system? Let's try the following:

Yes, this looks familiar. This are the updates installed on our mainframe using SMP/E which we will discuss later in the course. Windows Update got its start decades after SMP/E was introduced.

1.1.2 Linux CPU information- lscpu, /proc/cpuinfo and lstopo (hwloc)

The Linux commands lscpu, /proc/cpuinfo and lstopo (hwloc) can report detailed information about the cpu cores/processing units.

For example, the most frequently used Linux command to display system information about the processor is cat /proc/cpuinfo . The Linux cat command displays the content of a file. The Linux /proc subdirectory is a virtual directory, which contains information about the system hardware and functionality. The Linux /proc subdirectory does not really exist. During the Linux boot process this virtual directory is created. The system information stored in RAM contains many of the same information that you can find in the Windows Device Manager. The following is a partial example of the information of display by cat /proc/cpuinfo

Virtual files such as / proc/interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system's hardware. Others, like the /proc/filesystems file and the /proc/sys/ directory provide system configuration information and interfaces.

Summer 2018

1.1.3 z System CPU Information SDSF /D M=CPU

How to Get System Information without being a z/OS Systems Programmer - http://www.longpelaexpertise.com/ezine/InfoFromzOS.php

To display the CPU information for our mainframe, navigate to SDSF by typing the =SD command and press right-ctrl to execute. On the SDSF command line enter /D M=CPU and press right-ctrl to execute.

The command /D M=CPU is a TSO line command to normally be executed at the TSO READY prompt or ISPF SHELL (more on this later.) For now, you can execute the D (Display command) by prefixing the D will a backward slash, or /D

Summer 2018

Z/OS operating system will display the following information somewhat similar to the following:

Hidden in this output is the model number: in this case 2094-722 (a System z9 EC). The following table shows processor models, and what they mean.

Mainframe model IDs and Numbers

2064-xxx = z Series 900 2066-xxx = z Series 800 2084-xxx = z Series 990 2086-xxx = z Series 890 2094-xxx = System z9 EC 2096-xxx = System z9 BC 2097-xxx = System z10 EC 2098-xxx = System z10 BC 2817-xxx = zEnterprise 196

1.1.4 Documenting z System CPU information

1. Use the Snipping Tool to document the CPU information below =

2. From the CPU information listed above, what is the serial number of z/OS CPU that you are using? Your answer is

3. From the CPU information listed above, what is the model number of your z System mainframe? Your answer is

1.2 Documenting Virtual Memory Paging Information

In a previous discussion on virtual memory and memory pages, you had learned that when the real memory (frames) is full, excess pages of a program or subsystem are temporarily stored as auxiliary storage or as a slot. The role of the virtual memory is to serve as table that determines the current location of the page, i.e., in real memory or on disk. The maximum amount of virtual memory available is dependent on the amount of disk storage dedicated to slots.

In the real world it is important to determine the amount of auxiliary storage allocated to support slots.

1.2.1 Windows Page information – Performance Options/Virtual Memory

The name of the paging file in Windows is a hidden file named PAGEFILE.SYS . One can 1) determine amount of storage space that slots are currently using PAGEFILE.SYS, or 2) change the amount of disk space allocated to PAGEFILE.SYS, or 3) change the location of PAGEFILE.SYS. Since the demonstration Window's computer has only one disk, the Drive C: is greyed out. Other options are prevented by Windows security settings. [Having too little space allocated to the paging file will cause Windows to be unable to execute more programs even though you have enough disk space.]

1.2.2 Linux Page information – swapon and free commands

The Linux swapon command will display the location and amount of page file space used to store slots

The Linux free command will display the both the real (mem) and swap space. If a large percentage of the swap space is used, then one of two actions may be warranted: you may want to either add an additional swap disk to increase the available swap space, or you may want to add additional physical memory to the system.

1.2.3 Questions – Virtual Memory

4A In reference to virtual memory operating systems, what is a Frame? Your answer is

4B. In reference to virtual memory operating systems, what is a Page? Your answer is

4C. In reference to virtual memory operating systems, what is a Slot? Your answer is

5. How does one display Windows Page file information? Your answer is

6. How does one display Linux Memory and page file information? Your answer is

1.2.4 Documenting z System Page Data sets - SDSF /D ASM

To display the data set names that space that z/OS is currently using slots for slots are displayed. Navigate to SDSF by typing the =SD command and press right-ctrl to execute. On the SDSF command line type /D ASM and press right-ctrl to execute.

7. Use the Snipping Tool to document your page data set names and utilization information below =

1.2.5 Changing the Size of the z System Page Datasets

Windows permits one to increase the size of PAGEFILE.SYS. This approach may lead to disk fragmentation and slow disk performance to page files. Linux creates a storage volume or partition, and hence is more difficult to change, but does avoid this disk fragmentation problem.

On the other hand z/OS permits the system programmer to allocate a paging data set on any volume of any size. Allocation is designed to use contiguous tracks and cylinders and therefore avoid disk fragmentation. Once a new page data set has been allocated it simply be activated (added) by the system program command /pa page=xx.yy.zz , where the name of the new page data set is xx.yy.zz

1.3 SDSF OWNER and PREFIX Filters

Basic SDSF Commands - http://mainframewizard.com/content/basic-sdsf-commands

The SDSF OWNER will filter list of JCL the z System Userid who submitted the JCL Job. For example, if you type OWNER RMUI001 on the SDSF Command Input prompt, SDSF will only display JCL Jobs which were submitted by UserID RMUI001.

The SDSF PREFIX is the Job Name of the JCL JOB statement. Normally the PREFIX Filter would be PREFIX * As a result the following would be displayed.

The filter OWNER RMUI001 and PREFIX * would instruct SDSF to display any job name that was submitted by userid RMUI001.

The SDSF DA command will display all active users. Before we execute that command we will need to set up SDSF Filters

Step 1. On the SDSF command line type OWNER * and press right-ctrl to execute. The asterisk will display any job submitted by any owners, or userids.

Step 2 On the SDSF command line type PREFIX RMU* and press right-ctrl to execute. This is change the filter to display all owners that start with a userid of RMU

After Steps 1 and 2 your filter line should appear as

Step 3 On the SDSF command line type DA and press right-ctrl to execute. The SDSF DA command will display all active users. You should see your userid highlighted in black.

1.4 Documenting current logon TSO users - SDSF DA Command

8A. Use the Snipping Tool to document the list of active users on the system at the time when you executed the DA command below =

8A.When using SDSF what is purpose of the PREFIX command and filter? Your answer is

8B.When using SDSF what is purpose of the OWNER command and filter? Your answer is

8C.List the SDSF OWNER and PREFIX commands that will display all JCL JOBs for userid BOB's submitted that includes a Job Name that starts ASSGN1. Your answer is

8D.List the SDSF OWNER and PREFIX commands that will display all JCL JOBs for any userid that includes 711 in the Job Name. Your answer is

1.5 Sysplex Not Active Error Message

Error messages appear in the upper right hand corner of the panel. In this case

You should see displayed information similar to the following. The SDSF DA command displays Active Users. When this example was captured using the prefix RMU*, only two TSO RMU* users were active

When you logon to any multiuser operating system, the operating system must start a program that allocates address space, and then runs a user interface within that address space. TSO will then interact with the user.

If 30 users are active, then 30 copies of TSO sessions (address spaces) are allocated. Multiple user interfaces are not as important in your Windows or MAC OS computer, since there is only one current active user.

Similar to z/OS Linux is a multiuser operating system and does permit multiple users. Every time you logon to Linux, either by using a command line interface or menu user interface like TSO/ISPF, or a graphical user interface, a multiuser operating system must allocate space for each individual logon user.

Do not confuse multiple user operating systems with multitasking. Each logon user who logons to a multiuser operating system, must allocate separate address space, and then each user can executed multitasks. The iPhone iOS is single-user and single tasking. Android is single-user, but may perfrom multitasking. But, z/OS, UNIX and Linux are multiuser and multitasking. The previous SDSF DA command provides evidence that are two current RMU* users which are identified by a JOBID of TSU06784 and TSU06785.

In z/OS, every "executing or executed" program is called a JOB. A JOB contains JCL commands which are used to start a program. When you logon to ANY operating system, the operating system must execute a logon program.

The first line of a JCL program MUST be the JOB card, e.g., //RMUI001 JOB 1,CLASS=TSU. When you logon, e.g., LOGON RMUI001, to the z/OS session, it executes a logon JOB. To review the syntax JCL (that was discussed in this assignment), columns 3 to 10 may contain a job name.

While one can submit jobs with the same, z/OS and JES must uniquely identify each job and a unique JobID or Job Number. Notice the values displayed under the JobID column, e.g., TSU06784 and TSU06785. TSO sessions use a JobID that are a combination of the TSO Job class and a unique number, e.g., Class TSU + Job Number 06784. Therefore, the SDSF command DA looks for TSU jobs, or Jobs that have been started and are active. UNIX and Linux functions in a similar way, except they will use the terminology of a "process id".

8E. Assume that SDSF displays a JobID of TSU06784. What does TSU mean? Your answer is

1.6 Security Implications of Multiuser Logon Sessions – Session Hijacking

Notice the security implications of logon sessions. Since I know the list of active logon users who have been authenticated and have assigned privileges and permissions, can a hacker hijack the multiuser session? This type of security attack is called "Session Hijacking". Yes, it is possible. This course does not address this security topic. However, one can see if one understands the multiuser process they can better appreciate a potential security vulnerability and the necessary requirements to protect this this type of threat. By taking over another user's session one may enjoy evaluated permissions of the vulnerable user or session.

At the end of our TSO Logon process, a CLIST program named VENDOR.CLIST was executed to start the ISPF menus. CLIST (Command List) (pronounced "C-List") is a procedural programming language for TSO in MVS systems. It is similar to the Windows Batch file. Unlike batch files, CLIST also supports conditional and looping (iteration) statements. CLIST can be used to provide TSO dialog screens, e.g., your password screen, or ISPF Menus.

1.7 SDSF Status (ST) Command

The previous SDSF DA (Active Users) command provides different information than the SDSF STATUS or ST commands. When the SDSF ST command was executed, the following was displayed. Comparing the following displayed results Job STATUS report will confirm that the displayed information is similar but different than the SFS DA command.

Earlier we had altered the SDSF filters by typing OWNER and right-ctrl to execute, and the PREFIX RMU* and right-ctrl key. The function of SDSF STATUS command is to display status of all jobs that are currently executing or have finished execution. The previous report only displays Job ID that begin with TSU, or TSO sections. In this discussion, batch COBOL program job submissions were ignored.

1.7.1 SDSF EXECUTION Job Status

A review indicates that two jobs had a job status EXECUTION. The EXECUTION JOB Status indicates that that the job was still running, and in this case the TSO session was active . Therefore, the SDSF command DA looks for TSU-prefixed jobs that are executing.

1.7.2 SDSF PRINT Job Status

Normally, when a JOB has a status of PRINT, the job submission has been completed. JES printing is the last phase of JOB executing. Sometimes, a JOB may display EXECUTION, when it is actually finished. Unlike Window operating systems the status displays are not automatically updated without user intervention. As a result, you can update the SDSF Job Status display by pressing right-ctrl.

Notice users (owners) RMU0119 and RMU0174 and their TSU Job status is PRINT, or not active. TSU jobs will automatically erase the JES TSU job status when the user properly logoffs. Users (owners) RMU0119 and RMU0174 were so busy to get to "happy hour" they did not logoff properly.

1.7.3 Infinite Loops - Batch programs that display a job status of EXECUTION

Normally, when a student's COBOL program is compiled, linked and executed the job lasts for less than a second. Therefore, a student's COBOL program job submission rarely is in the EXECUTION status for longer than a few seconds. This situation occurs when a student codes and executes any program that results in an infinite loop .

Students also code and execute VB.NET, Java and other program languages that create an infinite loop on Windows and Linux operating systems. But, these beginning programs are not COBOL batch programs without a user interface. In Windows or Linux, one can press the CTRL-C or CTRL-Break keys. Using SDSF one may purge a job that has a program that is stuck in an infinite loop.

Under the NP column, type P (to purge) and press right-ctrl to execute a job if it is executing in an infinite loop. For security reasons either the Owner of a Job or an instructor can purge a Job.

1.7.4 Questions – Job Status (PRINT and EXECUTION)

8F. A JCL Job list a Job Status of PRINT. What does the PRINT Job Status mean? Your answer is

8G. A JCL Job list a Job Status of EXECUTION. What does the EXECUTION Job Status mean? Your answer is

8H. List two examples of JCL Jobs that have a Job Status of EXECUTION. Your answer is

8I. When a Window's Program is executing in an infinite loop (will not stop) one can try to make the executing program stop by using either the Task Manager or press a CTRL-Break Keys. How does on stop a z/OS JCL Job executing in an infinite loop? Your answer is

1.8 Job or Process Priorities

1.8.1 z/OS Job Priorities and Initiators

Let's review the Jobs for all Owner Prefixes that start with RMU*.

Review the column labeled Prty (priority) column. An operating system uses priority values to determine which job or program should be allocated the most processing time. Any job or process which has a higher priority compare to others should have better throughput or response time.

A special operating system program called a z/OS Dispatcher is responsible for using the priority value to determine the amount of processor time to be allocated to the job or process. The dispatcher priority values for JobID TSU06784 and TSU06785 have is 15, while the other jobs have a dispatcher priority of 1. This makes sense. Since TSO jobs will require better response time to process user-entered keystrokes than batch jobs with no user interface. It makes sense to make the users happy by assign a higher Job priority.

How is the dispatcher priority set? Each job is assigned a JOB class. Each JOB class is assigned an initial priority value, which may be changed either manually by the system programmer, or automatically by the WorkLoad manager (WLM). In the case of the TSU job class, the default initial priority is set at value 15. This makes sense since TSO requires better response time than batch jobs since it must interact with users.

1.8.2 Windows Processes and Priorities

Every operating system has a system that assigns dispatcher priorities to manage throughput and response time for various applications or processes. In a desktop version of Windows, one can review the Base Priority values using the Task Manger and set the column display to show the Base Priority column. The displayed priority values are not numeric. Notice that most Windows Desktop processes are set to a Normal Priority, except the dwm.exe, Windows Desktop Manger is set to a High Priority. This also makes sense since the Windows desktop must interact with users like TSO.

1.8.3 Linux Processes and Priorities – ps, nice and renice commands

The Linux Priority value represents the initial priority. The Linux nice value is added or subtracted from the initial priority. The combination of priority and nice value of a process in Linux makes it dynamic: In addition, the longer a process runs, the lower its priority will be. The priority is taken into account when there are more processes running than CPU cores available: Highest priority wins. But, when a process loses its priority over time, other processes will take over the CPU priority at some point.

The Linux nice and renice commands may be used toadd/remove some "points" from priority. A process which has a higher nice value will get lesser CPU time. Root can also set a negative nice value - the process gets more CPU time. In modern desktops there is plenty CPU time available - they are fast these days. The bottom line is Windows and Linux servers has the same problem as z/OS.

In Linux you may display processes and priority information with the ps command

The -l (lowercase L) flag of the ps command displays the nice values and current priority values of the specified processes. The command is ps -lu user1 is executed below. For example, you can display the priorities of all of the processes owned by a given user with the following:

The Linux CMD column displays the name of the program that is being executed. Ksh is the name of the Linux command line user interface like TSO. Just as we display to separate processes for the two Ksh users session, this is very similar to JobIDs TSU06784 and TSU06785. All modern operating systems were based on IBM mainframe operating systems, and therefore, they often perform the same requirements using different names and procedures.

Now it is time for you to do some work. In the SDSF STATUS panel 1) Type PREFIX * on the SDSF command line and press right-ctrl to execute. This filter change will display all userIDs. 2) Type OWNER * on the SDSF command line and press right-ctrl to execute. This filter change will display all useriIDs. There will be hundreds of JOB status records displayed.

1.8.4 Documenting z System Job Priorities

9. What is the function of a Job or Process Priority? Your answer is

10. Use the Snipping Tool to document the a sample of job statuses below =

1.8.5 Questions - SDSF Status Filter Line – PREFIX, OWNER, and Wildcard characters

The SDSF Status Filter Line will limit the jobs to be displayed by JOB name. The JOB Name appears in the JCL JOB statement which is the first line of JCL. In the following example the JOBNAME is JPL.

The PREFIX filter will limit number of Jobnames displayed. A job name is with the JCL JOB statement. You may change the SDSF filter PREFIX, by entering PREFIX on the COMMAND INPUT Line. DO NOT USE THE EQUAL SIGN to separate the keyword PREFIX from the operand.

PREFIX=* means to display all JOBNAMEs.

PREFIX=JPL will ONLY display Jobnames of JPL.

PREFIX=JPL* will display ANY Jobname beginning with JPL and ends with any number of characters.

Similar to Windows and Linux the asterisk (*) is a wildcard character used to represent ANY zero or many characters, including the period.

Similar to Windows and Linux the question mark (?) is a wildcard character used to represent single character. Therefore, JPL???, which ends with three question marks wildcards, requires exactly three characters, not zero characters , not any one character , or not and two characters, rather exactly three characters.

Since z/OS wildcard characters were introduced in 1955 in TSO, one may assume that IBM introduced the concept of wildcard characters decades before MS-DOS, Windows, UNIX or Linux.

The OWNER filter will limit the number of Owner submissions displayed. The Job OWNER is the userid who submitted the job. The JCL code is not required to list the owner of the job, but JES and z/OS does keep track of the owner who was responsible for the job. You may change the SDSF filter OWNER by entering OWNER on the COMMAND INPUT Line. DO NOT USE THE EQUAL SIGN to separate the keyword OWNER from the operand.

OWNER=* means to display all jobs submitted by any owner.

OWNER=RMUI001 means to display all jobs submitted ONLY by owner RMUI001

OWNER=RMU* means to display all jobs submitted by ANY owner jobs whose owner begins with RMU and ends with any number of characters.

10.1 When viewing job submissions in SDSF, what is the purpose of a PREFIX filter? Answer = >

10.2 When viewing job submissions in SDSF, what is the purpose of an OWNER filter? Answer = >

10.3 Given the following SDSF Job Status Filter

When viewing job submissions in SDSF, which JOB will be displayed? (Hint: Think of AND) Answer = >

1.9 DB2 Subsystem

When our z/OS system goes down for maintenance and then rebooted, the DB2 database manager is not automatically started. One method to determine if the DB2 is running is to use the Find command in SDSF. All DB2 jobs (processes) begin with DBAG, which means DB - DB2, version A (The letter A represents the number 11 in hexadecimal, and G - general z/OS DB2. Type F DBAG and press right ctrl to execute. The Find command only finds the first occurrence of DBAG (which will work in our example if you have OWNER=* and PREFIX=*).

or you can change the Prefix to DBAG*. Ensure the owner filter is set to *.

1.9.1 Documenting the DBAG or DB2 Subsystem jobs

11. Use the Snipping Tool to document the list of job statuses that starts with the string of DBAG below =

If you do not see a DBAG JOB names displayed, then 1) ensure that your PREFIX filter is properly set, or 2) ensure that your OWNER filter is properly set. If your SDSF filters are properly set contact your instructor. Perhaps DBAG, or DB2, is not running.

1.9.2 Questions – DBAG or DB2 Subsystem

11.1 List the job names of DBAG of DB2 jobs that are currently executing? Answer = >

11.2 List the owner of the DBAG, or DB2 jobs? Answer = >

11.3 A student cannot see any of DBAG, or DB2 jobs listed. The student's SDSF Filter appears as the follows:

What is the problem of the previous SDSF Job filter? Answer = >

11.4 A student does see the DBAG, or DB2 jobs listed. After completing this assignment the student can no longer see their SDSF jobs after submit their JCL jobs/ SDSF Filter appears as the follows:

What is the problem of the previous SDSF Job filter? Answer = >

12. What is the dispatcher priority value for DBAG? Answer = >

13. In your informed opinion (read the previous discussion one more time), do you believe the dispatcher priority value for DBAG is appropriate? Please explain in detail. Yes of No is not an answer. Answer = >

1.9.3 What is a z System Job Class?

Notice the JOBID of DBAG, it is prefixed with the STC job number (class), rather the TSU job number(class) used by TSO sessions. A job class is a named collection of job processing parameters, such as dispatcher priority, default initiator, and other parameters execution.

z/OS provides 38 predefined JOB Classes. The MOST popular z System job classes are TSU and STC job classes. The TSU Job class was introduced earlier since this is the default job class used to start time sharing sessions when users logon. The STC (Start Task Control) is the default Job class that is most often used to start z subsystems such as DB2, CICS, WebSphere, RACF, and many others. If the system programmer does not believe that the z/OS predefined job classes are appropriate for their z System installation that may customize their own job class parameters.

ALL operating systems use predefined parameters similar to a JOB class to start a program. Windows hides the details of these start up parameters from the user. In this course, it is important to be aware that Job classes and Start Up parameters exist and will be important to performance of your System z, Windows or Linux server.

1.10 CICS Subsystem

When our z/OS system goes down for maintenance and then rebooted, the CICS subsystem will not be automatically started. One method to determine if the CICS is running is use the Find command in SDSF.

However the Find command works by searching from the cursor position downwards. Since we had previously typed and executed F DBAG, we need to move the cursor to the TOP of the job status list. Type TOP and press right ctrl to execute.

Now type F CICS and press right-ctrl to execute. The Find command only finds the first occurrence of CICS (which will work in our example).

Or you can the Prefix to CICS*.

You will see jobs display as CICSTS42, which means CICS Transaction Server Version 4.2. The current CICS version is 5.5 and version 6.0 is being tested by z System customer as of 2017

1.10.1 Documenting CICS Subsystem Jobs

15. Use the Snipping Tool to document the list of all job statuses that starts with the string of CICS below =

If you do not see any CICS JOB names displayed, then 1) ensure that your PREFIX filter is properly set, or 2) ensure that your OWNER filter is properly set. If your SDSF filters are properly set contact your instructor. Perhaps CICS is not running.

16. Why does the job status value for CICS is listed as EXECUTION? Answer = >

17. What is the dispatcher priority value for CICSTS42? Answer = >

18. After reviewing the previous discussion one more time, do you believe the dispatcher priority value for CICSTS42 s appropriate? Please explain in detail. Yes of No is not an answer. Answer = >

Using the F command in ISPF or SDSF is very useful, but you must remember the rules of the FIND command. 1) It only searches downwards. Use the TOP command between multiple searches. 2) It only finds the first occurrence of the string to be searches. Press the F5 to repeat the Find command.

1.10.2 Using the SDSF PREFIX Command - More Examples

Now type PREFIX DBAG* and press right ctrl to execute. (Do not forget the wildcard character the trailing asterisk. Who invented operating system wildcard characters? I forgot.)

The Find command only finds the first occurrence of DBAG. The PREFIX filter display all Jobs that have a prefix of DBAG

19. Use the Snipping Tool document the list of all job statuses with the prefix of DBAG below =

The command will ask you to display all jobs who are owned, or started by a user ID. Either use OWNER information from the SDSF status (other than your own), or select any other USERID that your own from the userid list displayed in the Blackboard Assignment folder. Your instructor may also decide to provide a specific owner to be displayed.

Now type OWNER XXXXXXX where XXXXX is another userid and press right ctrl to execute. Do not used you userid.

20. Use the Snipping Tool document the list of all job statuses of some other owner or userid other than your userid below =

1.11 Documenting ALL JOBs (/$DA,X)

Step 1. Type /$DA,X and press right-ctrl to execute. This command will display all executing programs, similar to the Windows Task Manager and the Linux ps command.

Step 2. SDSF has limited capabilities to display detailed system information with many records. Type ULOG and press right-ctrl to execute.

Unlike SDSF, ULOG will permit you to use the function keys to move to the next page or to the bottom (F8), move to the previous page (F7),shift to the right (F11), or shift to the left (F10).

1.11.1 Using ULOG

21. Use the Snipping Tool to document all executing programs below =

Step 3. Use the Find command to find your TSO section. Type F XXXXXXX where XXXXXX is your useID. If necessary press F5 to repeat the find until you see your TSO session with the job class of TSU

22. Use the Snipping Tool to document your TSO session below =

Important distinction! The SDSF command DA command displays all active users. The /$DA,X displays all active system jobs.

ULOG - Display all Active Jobs

Step 1. Type /$DA,X and press right- ctrl to execute.

Step 2. SDSF has limited capabilities to display detailed system information with many records. If the number of active users is too long type ULOG and press right ctrl to execute.

Unlike SDSF, ULOG will permit you use the function to move to the next page or to the bottom (F8), move to the previous page or top (F7), shift to the right (F11), or shift to the left (F10).

23. Use the Snipping Tool to document the active users below =

1.11.2 How do I turn ULOG off?

Type OFF and press right- ctrl to execute.

1.11.3 Forward Slash (/), Forward Slash- Dollar Sign and No Prefix Commands

I am confused?

It seems that some commands begin with a forward slash (/), other commands may begin with a forward slash and dollar sign (/$) and some commands have no command prefix, or does not begin with anything. The difference between command prefixes is which z/OS subsystem is responsible to execute the command. Consider the flowing table

Command

Function

Who executes the command?

DA

Display active users

SDSF or the current subsystem, e.g., ISPF

/$DA,T

Display active users

JES retrieves information from the system logs SYSLOG

/D M=CPU

Display processor information

z/OS or MVS executes the command

TOP

Move to the TOP of the display

SDSF or the current subsystem, e.g., ISPF

/D PROD, REGISTERED

Display the registered products

z/OS or MVS executes the command

/D TCPIP,,N,ROUTE

Show the routing table

TCPIP executes the command

/D TCPIP,TCPIP,NETSTAT,HOME

Show the IP configuration (IP addresses and links)

TCPIP executes the command

1.12 Review Questions – Window and Linux Status information

1. A user is executing the WMIC and SYSINFO commands. What type of system information is provided by these commands? Which operating system support the WMIC and SYSINFO commands? Answer:

2. A user is executing the lscpu or cat /proc/cpuinfo commands. Which operating system will use this command? Answer:

3. Which SFSF command is used to display z System CPU information? Answer:

2.0 ISPF and ISPF Editor

Chapter 4: TSO/E, ISPF, and UNIX: Interactive facilities of TSO: Introduction to the Mainframe: z/OS basics

Video - ISPF Productivity Tool Overview Part 1

https://www.youtube.com/watch?v=fhkms6ozen4

Video - ISPF Productivity Tool Overview Part 2

https://www.youtube.com/watch?v=y7L-VpZdLg0

Video - Editor in ISPF (z/os, s390) - http://www.youtube.com/watch?v=fhkA5n-ovJo

Video - TSO, ISPF, SDSF, the ISPF editor - Unit -04 http://youtu.be/vOiHiI7b9iY

IBM Paul Newton's presentation and demonstration of TSO, ISPF, SDSF, the ISPF editor.

See Blackboard Folder "Paul Newton's z System Presentations" for a copy of this Presentation

2.1 ISPF overview

· Acronym for Interactive System Productivity Facility

· ISPF is a menu-driven interface for user interaction with z/OS system. The ISPF environment is executed from native TSO.

· ISPF provides utilities, an editor and ISPF applications to the user. To the extent permitted by various security controls an ISPF user has full access to most z/OS system functions.

· To access ISPF under TSO, the user enters a command from the READY prompt to display the ISPF Primary Option Menu.

· You can access online help from any of the ISPF panels (press the PF1 key)

· ISPF includes a text editor and browser, and functions for locating files and performing other utility functions.

After logging on to TSO, users typically access the ISPF Primary Options menu. In fact, many use ISPF exclusively for performing work on z/OS. ISPF is a full panel application navigated by keyboard. ISPF includes a text editor and browser, and functions for locating and listing files and performing other utility functions. ISPF menus list the functions that are most frequently needed by online users.

2.2 ISPF Menu Structure

ISPF has a “tree structure.” Some UNIX users call this menu structure a “captive” interface. The Primary Option menu is at the top of the tree. This panel can be customized with additional options by the local system programmer. Therefore, it varies in features and content from site to site.

General structure of ISPF panels

Option zero (0) allows you to change ISPF settings. For example, the command line for your ISPF session might appear at the bottom of the display, while your instructor’s ISPF command line might appear at the top. This is a personal preference, but traditional usage places it at the top of the panel. If you want your command line to appear at the top of the panel, do the following:

1. Go to the ISPF primary option menu.

2. Select option 0 to display the Settings menu

3. In the list of Options, remove the “/” on the line that says “Command line at bottom.” Use the Tab or New line key to move the cursor.

2.3 Standard 3270 ISPF Keyboard Mapping

· Function Key

· Enter Right Ctrl (right side)

· Exit, end, or return PF3

· Help PF1

· PA1 or Attention Alt-Ins or Esc

· PA2 Alt-Home

· Cursor movement Tab or Enter

· Clear Pause

· Repeat Last Find Command PF5

· Repeat Last Change PF6

· Page up PF7

· Page down PF8

· Scroll left PF10

· Scroll right PF11

· Reset locked keyboard Left Ctrl (left side)

ISPF Primary Options Menus and Panels

Display Examples

Status Pull Down Menus

Option 0 Session Settings Panel Menu

Option 1 View Panel Menu

Browsing the contents of a data set. Cannot edit

A View Window

ISPF Primary Options

Display Examples

Option 2 Edit Menu

If you have made a connection to the workstation, you can specify a workstation file name, for example

C: \AUTOEXEC.BAT,

in this field.

Option 3

Utilities Menu

Most popular

4. Dslist is like Windows Explorer

3. and 2 Work with PDS and Sequential data sets operations

1. List options for PDS members

Option 6 ISPF (TSO) Command Shell

Similar to Window cmd shell, but one executes TSO line commands without exiting ISPF

2.4 Using the ISPF Editor to create a new PDS Member – a Short-cut

Step 1. Enter = 3.4 and press right-ctrl to navigate to the Data Set List Utility Panel. Your TSO logon account should be listed at the Dsname Level parameter. If not, edit the DSNAME Level parameter to list your UserID. Check that the Volume Serial entry is left blank. Press the right-CTRL key to continue.

DO NOT enter the example of RMUI001

Step 2. Type E (for edit) under the command column. Move the cursor to the right of RMUXXXX.JCL and append a member name. This example appended the member name (PACKY). A member name must be surrounded by parentheses. You are required to use YOUR name as a member name. A member name must be severn (7) characters or less.

When you edit a member name that does not exist, z/OS will automatically create a new blank member. Then you will move to the edit panel. If you type 'E" to edit a member that does exist, the member will be opened for editing. If you just type E with a member name, the next panel will display all members in the data set.

Now enter your name as a new member name and press the right-CTRL key to continue.

Step 3. By default an Edit Entry Panel may be displayed on SOME z System servers to warn you that you are trying to create a new PDS member. Your z System server may not display this warning. Ignore the following instructions.

You may type a space to replace the forward slash before Warn on First Data Change, but this is not recommended. Type right-ctrl to continue.

Step 4. A blank new PDS member will appear in the ISPF Edit Panel. Notice that the upper left-corner displays the ISPF panel name EDIT.

You are required to complete the following steps and then document you final version of your ISPF EDIT practice document.

Move the cursor (preferably using the arrow keys) and type the following lines, e.g., "This is Line 1, This is Line 2, This is Line 3 and This is Line 4."

2.5 Using ISPF Edit Line Commands

When editing a data set or data asset member, you often use line commands to work with the contents of the data set. For example:

· To edit the contents of a data set, move the cursor to the area of the record to be changed and type over the existing text.

· To insert a new line, use the ISPF Edit Line command

· To find and change text, you can enter commands on the editor command line.

· To insert, copy, delete, or move text, place these commands directly on the line numbers where the action should occur.

·

Warnings! Gotchas!

· You cannot enter ISPF line commands if the Insert keys are on

· You cannot execute any other command if there are any pending line commands. Type the Primary command RESET to cancel any pending commands.

· You may not be able to execute any ISPF Line commands if there is an incorrect Primary command entered on the Command Line. You must manually erase any incorrect Primary commands.

Video - Option 3.4 DSLIST Panel - Browse View Edit Rename Delete (14) (Kumar IT Channel)

https://www.youtube.com/watch?v=gz9Uza87BgY

Video - Option 3.4 DSLIST Display Dataset Properties Line Command (15) (Kumar IT Channel)

https://www.youtube.com/watch?v=kEzGuL1pOTs

Video - Option 3.4 DSLIST Edit Mode Insert (I) Line Command (22) (Kumar IT Channel)

https://www.youtube.com/watch?v=M7Y7hYGbbPw&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni&index=21

Video - Option 3.4 DSLIST Edit Mode Repeat (R) Line Command (23) (Kumar IT Channel)

https://www.youtube.com/watch?v=-bahd_xJLVE&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni&index=22

Video - Option 3.4 DSLIST Edit Mode Delete (D) Line Command (24) (Kumar IT Channel)

https://www.youtube.com/watch?v=gRFxd7VlHds&index=23&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni

Video - Option 3.4 DSLIST Edit Mode- Exclude (X) Line Command (25) (Kumar IT Channel)

https://www.youtube.com/watch?v=8q0qLRRMob8&index=24&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPn

Video - Option 3.4 DSLIST Edit Copy (C) Line Command (26) (Kumar IT Channel)

https://www.youtube.com/watch?v=N8YGSyEe4h0&index=25&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni

Video - Option 3.4 DSLIST Edit Move (M) Line Command (27) (Kumar IT Channel)

https://www.youtube.com/watch?v=-y7AlT6cdV0&index=26&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni

Video -Option 3.4 DSLIST Edit Upper/Lower Case (UC/LC) Line Command (28) (Kumar IT Channel)

https://www.youtube.com/watch?v=aMoXpEAYOKQ&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni&index=27

Primary Command: RESET

Step 8. To remove any blank or warning lines, type the Primary command RESET command prompt. Then press the right-CTRL key to execute it.

2.5.1 Insert Line Command

Step 10. Inserting a single line (I) Insert Line Command

Type I on any line number that you want to insert a line after. Press the right-ctrl key to execute.

[Before]

[After]

2.5.2 Primary Command: RENUM

Type RESET to hide any line messages. Type RENUM to re-number all lines.

Step11. Inserting Multiple Lines at the beginning of the editor (I5)

Type I followed by the number of lines that you want to insert, e.g., I5. Lines will be inserted AFTER the line the command was written. Press the right-ctrl key to execute.

[Before]

[After]

2.5.3 Copying Line(s)

Step 12. Copying a Single Line (C line command)

Type C on the line to be copied. Type A (for after) or B (for before) the line that you want to copy the line to. It really does not matter which order you type the C or A. Line commands will only be executed after you press the right-CTRL key.

[Before]

[After]

2.5.4 Repeating Lines

Step 13. Repeating Lines (R line command)

Type R on the line to be repeated. If your follow the R command by a number, e.g., R5, then the line will be repeated 5 times. Line commands will only be executed after you press the right-CTRL key.

[Before]

COBOL has many commands that are similar. For example, COBOL has a command like this:

MOVE THIS TO THAT .

Some programmers repeat this command 10 times and simply type over the THIS and THAT phrases for the data that want to code.

2.5.5 Moving Lines

Step 14. Moving a Block of Lines (MM..MM, A)

Most line commands provide for a block option. Surround the lines to be moved with a beginning MM and an ending MM command. The lines between and including the MM marked lines will be moved. Type A (for after) or B (for before) to where you will like to move the lines. The type of blocking technique can be used for the Copy lines, Delete Lines, and many other line commands.

[Before]

[After]

2.5.6 Copying Lines

Step 15. Copying a Block of Lines (CC..CC, A)

[Before]

[After]

2.5.7 Documenting ISPF Editing Requirements 1

1. It is required to display your data set name which lists your user catalog. Use the Snipping Tool to document your ISPF screen below =

Type each of the following ISPF primary commands, to be entered on the Command line, and press right-ctrl to execute. It is recommended to follow the order of the commands as provided

Command

Explanation

TOP

This will move the display lines to the top of the data set. Since the FIND (F) command searches downward this is important.

F LINE

This will move the cursor to the occurrence of LINE

Press F5

This will repeat the last the last Find command. Repeat pressing F5 until you navigate through all occurrences of LINE

TOP

Return to the TPO for the next example

F 'LINE 1'

If you wish to search for text that contains spaces, the string must be enclosed in a single quote.

Press F5

This will repeat the last the last Find command. You will not encounter any more.

TOP

L 3

The LOCATE (L) command will locate a physical line number, not the display ISPF displayed line found under the Commands column. Find (F) finds text value. Locate (L) move the cursor to a physical line number.

Both are VERY useful to navigate to a line in a COBOL program based on the error messages displayed in SYSPRINT COBOL

TOP

C THIS THAT

Changes the first occurrence of THIS to THAT

F6

Repeat last change. Press F6 until all changes are made

TOP

C THAT THIS ALL

Change ALL occurrences of THAT to THIS

C 'LINE 4' 'GO STEELERS'

To change which contains a space, single quotes must surround the text

SAVE

Save you changes without exiting

Exit without saving in the future, type CANCEL but not now.

2. The previous requirement made some changes. It is required to display your data set name which lists your user catalog. Use a Snipping Tool to document your ISPF changed edit panel below =

2.5.8 Deleting Lines

Step 16. Deleting a Block of Lines (DD..DD). Execute these ISPF Line commands.

[Before]

[After]

Delete any remaining line and use the RESET command to this content and panel view.

2.5.9 Primary Command: Displaying Columns

Step 17. Displaying Columns. Execute these ISPF Line commands.

COBOL is a column sensitive application programming language. Cobol syntax may be only coded between columns 8 and 71. Some COBOL statements must begin between columns 8 and11. Other COBOL statements may begin between columns 12 and 71. A COBOL comment is typing an asterisk in column 7.

Therefore, it should not be surprising why many COBOL programmers prefer displaying the column line. Type COLS in the primary command line and press right-Ctrl

[Before]

{After]

2.5.10 SHIFTING COLUMNS

Step 18. Shift columns to right ( )) ..)) 7 ) Execute these ISPF Line commands.

Even with the column line many COBOL programmers will still make errors and will type the syntax in the wrong column. Fortunately, there is a column move command. You may type a single parenthesis to move a single line to a new column position, or double parentheses to move a block on lines.

In this example, type )) in the beginning of the block, and ))7 at the end of the block. The number"7" indicates to move 7 columns from the current position. ")" means to move to right, and "(" means move to the left.

[Before]

[After]

2.6 Split Screen (F2)

Step 19. Split Screen (F2)

To view and edit two data members/sets in ISPF, one can split the screen. Before pressing the F2 function key, position the cursor in the middle of the panel. This is where ISPF will split the screen at the cursor position. This allows you to have two or more concurrent ISPF screens.

Create split screens by pressing PF2. This creates a second screen beginning at the current cursor position. To create “full” screens, position your cursor at the very top or very bottom of the display and press PF2.

Toggle between split screens using PF9 (‘SWAP’). Exit any spilt screen by pressing F3.

Before continuing with this spilt screen example, review the previous display. Four lines are used to display the list of function keys, e.g., F1 Help, etc. at the bottom of the panel. Many programmers prefer to remove these lines to increase the number of visible lines available for editing.

2.7 Primary Command: PFSHOW

To remove the Function key display line type the primary command PFSHOW OFF and press the right-Ctrl key. Notice that PFSHOW is one word followed by a space

To re-display the Function Key display line type the primary command PFSHOW ON and press the right-Ctrl key

2.8 Changing the Scroll Value

Step 20. Changing the Scroll Value. Execute these ISPF Line commands.

The Scroll Value determines how many lines are scrolled very time you press the F7 key to scroll-down (forward) through any ISPF panel and you press F8 key to scroll-up (Backwards) through any ISPF panel. The scroll value is set to PAGE by default and can be used to scroll through ISPF EDIT document or any log file.

You can the scroll value to either HALF or CSR. The HALF potion will scroll in half-page increments. Many prefer the CSR increment which will scroll anywhere you position the cursor. The change the scroll value or increment simply move the cursor and overtype the value. For example:

Useful ISPF Commands - http://ruifeio.com/2013/01/18/ispf-useful-commands/

Step 21. Using the Primary Commands; TOP or BOTTOM

The BOTTOM primary command is especially useful to moving to end of a program, most likely where you last were coding. On the other hand, most log file will automatically open at the end of the log data set or the most recent log entry. The TOP command moves quickly to the oldest or beginning entry in the log file.

The following commands LOCATE, FIND and CHANGE always functions from the beginning or TOP of a data set. It is a good idea to enter the TOP command when you use LOCATE, FIND or CHANGE in next examples.

2.9 Primary Commands: LOCATE (L) or FIND (F)

Step 21. Using the Primary Commands: LOCATE (L) or FIND (F) [You can use the abbreviation]

LOCATE will move to a specific ISPF Line number. It will LOCATE a line number. L 150

Always start the LOCATE command with a TOP command, e.g., TOP;L 150

FIND will move to a specific line number based on a string. For example F PROCEDURE

This example will move to the first line that contains the word PROCEDURE. You can press the F5 function key to repeat the last FIND command to find the next string.

Always start the FIND command with a TOP command, e.g., TOP;F PROCEDURE

FIND will move to a specific line number based on a phrase which will contain embedded spaces by enclosing the phrase with single quotes. For example F 'LETS GO STEELERS'

2.10 Primary Commands: CHANGE (C )

CHANGE will a word or phrase to a different word or phrase. For example C PERFROM PERFORM

This is my most popular coding error. I always incorrectly misspell the PERFORM command in COBOL.

You can press the F6 function key to repeat the CHANGE command to change the next word or you can change all of the words by appending ALL. For example C PERFROM PERFORM ALL

CHANGE will change a phrase which will contain embedded spaces by enclosing the phrase with single quotes. For example C 'LETS GO STEELERS' 'LETS GO PENGUINS'

(Of course I am biased.)

You can also delete a word or phrase using CHANGE command by using two single quotes – a null string. For example C 'LETS GO STEELERS' ''" ALL

Always start the CHANGE command with a TOP command, e.g., TOP;C PERFROM PERFORM

ISPF Tips for Cobol Programmers - http://billpriceweb.com/ispf.html

Video - Option 3.4 DSLIST Edit Show Columns (COLS) Primary Command (29) (Kumar IT Channel)

https://www.youtube.com/watch?v=V6xHKe_8wY8&index=28&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni

Video - Option 3.4 DSLIST Edit CAPS ON Primary Command (30) (Kumar IT Channel)

https://www.youtube.com/watch?v=v1_hN9yjjFU&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni&index=30

Video - Option 3.4 DSLIST Edit FIND String Primary Command (31) (Kumar IT Channel)

https://www.youtube.com/watch?v=v1_hN9yjjFU&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni&index=31

2.11 Questions – Functions, primary or line commands.

Video - Option 3.4 DSLIST Edit Important Function Keys 31 (Kumar IT Channel

https://www.youtube.com/watch?v=LVNvlHACitA&list=PLLcYGaQ7eeuTbGPLiApXSwmOhDofjaPni&index=31

9. Describe the effect of the following ISPF Editor primary, line or function key commands.

ISPF Editor Function Keys, Primary Commands and Line Commands

Description or purpose of each function key, primary or line command

F3

F5

F6

F7

F8

F9

F10

CANCEL

C THIS THAT

C THIS THAT ALL

I6

RESET

LOCATE "THIS'

))7...))

XX…XX

D

COPY

PSHOW OFF

C 'GOOD LUCK' ""

TOP; F PROC

11. ISPF is initialized to scroll one page at a time if you press with F7 UP or F8 down. The number of lines that your ISPF display will move up or down is determined the ISPF scroll value. Change you ISPF Scroll Value to to CSR (cursor).

2.12 Documenting ISPF Editing Requirements 2

12. It is required to display your data set name which lists your user catalog. Use the Snipping Tool to document your ISPF scroll value which is set to CSR below and to document any recent ranges that you have made. =

11. How do you execute two or more ISPF commands, e.g., SUB;=SD;ST?

2.13 ISPF HILITE Command

HILITE ON

Sets program coloring on

HILITE OFF

Turns this feature off

HILITE AUTO

Allows ISPF to determine the language

HILITE ASM

Highlights the data as Assembler

HILITE C

Highlights the data as C

HILITE COBOL

Highlights the data as Cobol

HILITE HTML

Highlights the data as HTML

HILITE JCL

Highlights the data as Job Control Language (JCL)

HILITE REXX

Highlights the data as Rexx

3.0 - JCL Utilities, Procedures, Substitution Variables and PROC Overrides

Using the Job Control Language and the System Display and Search Facility - Chapter 6 - "Introduction to the New Mainframe: z/OS Basics"

Video - JCL Lecture Part 1 Basics (Kumar IT Channel)

https://www.youtube.com/watch?v=L8rwjmRs3wE

Video - JCL Lecture Part 2 JOB CARD, JCL standards, POSITIONAL, KEYWORD PARAMETER (Kumar IT Channel)

https://www.youtube.com/watch?v=WpKldeLsi0I

Video - z/OS Job Control Language (JCL) - Part-6

IBM Paul Newton's discussion and demonstration of the functions of JCL, the JCL JOB, EXEC, and DD statements, and the relationship of a program file name to JCL DDNAME

http://youtu.be/lgg_4lBQHNw

See Blackboard Folder "Paul Newton's z System Presentations" for a copy of this Presentation

It is recommended that you refer to following chapters in your text book.

Chapter 6: Using Job Control Language and system Display Facility. Text book " Introduction to the Mainframe: z/OS Basics"

Please Read

· Introduction to JCL handout

· Introduction to JCL (The JOB Statement)

· Introduction to JCL (The EXEC Statement)

· Introduction to JCL (The DD Statement)

JCL Lecture Part 3 PARM, SYSIN DD * (Kumar IT Channel)

https://www.youtube.com/watch?v=l-QjcWmOZK8&list=PLLcYGaQ7eeuQv-n9FtIqYCxkvvDdgL6VD&index=3

JCL Lecture Part 4 DD Statement (Kumar IT Channel)

https://www.youtube.com/watch?v=g6EN0LvLqjs&index=4&list=PLLcYGaQ7eeuQv-n9FtIqYCxkvvDdgL6VD

Datasets are mainframe files with records organized in a specific format. Datasets are stored on the Direct Access Storage Device (DASD) or Tapes of the mainframe and are basic data storage areas. If these data are required to be used/created in a batch program, then the file (i.e., dataset) physical name along with the file format and organization are coded in a JCL.

The definition of each dataset used in the JCL is given using the DD statement. The input and output resources required by a job step needs to be described within a DD statement with information such as the dataset organization, storage requirements and record length. https://www.tutorialspoint.com/jcl/jcl_dd_statement.htm

SDSF General Instructions - https://kb.wisc.edu/helpdesk/page.php?id=46

What is the System Display and Search Facility (SDSF)? - http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zconcepts/zconc_whatissdsf.htm

SDSF panels - http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.isfa500%2Fxcmdref.htm

3.1 IBM Utilities

Utility programs are pre-written programs, widely used in mainframes by system programmers and application developers to achieve day-to-day requirements, organizing and maintaining data.

Utility Name

Functionality

IEHMOVE

Moves or copies sequential datasets.

IEHPROGM

Deleting and renaming datasets; catalog or uncatalog datasets other than VSAM

IEHCOMPR

Compares data in sequential datasets.

IEBCOPY

Copy, Merge, compress, back-up or restore PDS.

IEFBR14

No operation utility. Used to return control to user and terminate. It is often used to create empty dataset or delete an existing dataset. For example, if a dataset is passed as input to a IEFBR14 program with DISP=(OLD,DELETE,DELETE), the dataset is deleted at job completion.

IEBEDIT

Used to copy selected parts of a JCL. For Example, if a JCL has 5 steps and we require to execute step 1 and 3 only, then a IEBEDIT JCL can be coded with a dataset which contains the actual JCL to be executed. In the SYSIN of IEBEDIT, we can specify STEP1 and STEP3 as parameters. When this JCL is executed, it executes the STEP1 and STEP3 of the actual JCL.

IDCAMS

Create, delete, rename, catalog, uncatalog datasets (other than PDS). Usually used to manage VSAM datasets.

DFSORT or SYNCSORT

DFSORT & SYNCSORT are sort utilities. The utility named SORT is an alias for DFSORT & SYNCSORT. DFSORT is IBM's sort product. Syncsort is Syncsort's sort product. CA-Sort is CA's sort product.

With SYNCSORT/DFSORT, you can sort, merge, and copy data sets. You can use DFSORT to do simple tasks such as alphabetizing a list of names, or you can use it to aid complex tasks such as taking inventory or running a billing system. DFSORT gives you versatile data handling capabilities at the record, field and bit level.

Video - IBM JCL Utilities (Tutorials Point Series)

https://www.tutorialspoint.com/jcl_online_training/jcl_ibm_utilities.asp

Video - IBM JCL Utilities Text Link (Tutorials Point Series)

https://www.tutorialspoint.com/jcl/jcl_utility_programs.htm

Video - JCL SORT and MERGE Utilities (Tutorials Point Series)

https://www.tutorialspoint.com/jcl_online_training/jcl_sort_and_merge_utilities.asp

Video- JCL SORT Text Link (Tutorials Point Series)

https://www.tutorialspoint.com/jcl/jcl_basic_sort_tricks.htm

Video JCL Lecture Part 5 IBM Utilities (Kumar IT Channel)

https://www.youtube.com/watch?v=4DenooWyPUc&list=PLLcYGaQ7eeuQv-n9FtIqYCxkvvDdgL6VD&index=5

Video - JCL Lecture Part 6, PS, PDS & important IBM utilities, parameters in JCL (Kumar IT Channel

https://www.youtube.com/watch?v=4DenooWyPUc

Video - JCL Hands-on Part 3 Using the IEFBR14 utility to allocate and delete PS, PDS, or temporary data set (Kumar IT Channel)

https://www.youtube.com/watch?v=G2r-wphCz9A&index=3&list=PLLcYGaQ7eeuTaCU65xNfW_JSvCgIqXrGs

Video - JCL Hands-on Part 4 Using the IEBGENER to copy physical sequential data sets (Kumar IT Channel)

https://www.youtube.com/watch?v=vZcb0I9OWB8&index=4&list=PLLcYGaQ7eeuTaCU65xNfW_JSvCgIqXrGs

Video - JCL Hands-on Part 5 Using the IEBCOPY to copy, merge or compress partitioned data sets (Kumar IT Channel)

https://www.youtube.com/watch?v=qnCSjdtRmT8&list=PLLcYGaQ7eeuTaCU65xNfW_JSvCgIqXrGs&index=5

3.2 Introduction JCL Sorting

The following example will sort a PDS member named RMUXXXXX.JCL(AREACODE). This dataset lists the first-three digits on the postal area codes followed by the state or country that uses those first-three digits. The JCL will EXEC the SORT program. The SORT program is an older utility program and has been replaced by the DFSORT program. The DFSORT program provides more options to exclude, include, MERGE, and copy datasets. The syntax between SORT and DFSORT is similar by, but DFSORT is more powerful. At the time of this writing DFSORT is not available on our system.

Step 1. On the ISPF command input type =3.4, press the right-ctrl key. Move the cursor to the RMUXXXX.JCL partitioned dataset. When the RMUXXXX.JCL displays a list of members type "E" under the command column to edit this PDS member. Press the right-ctrl key. (You may also use "B" for browse.)

3.2.1 Document RMUXXXX.JCL(AREACODE)

Step 2. Enter the reset;cols command on the Command line (Do not use embedded spaces). The ISPF primary command will not execute until you press the right-ctrl key.

Document the data contained in this PDS member named RMUXXXX.JCL(AREACODE) below =

Hint: you should see the phone area code associated with each state.

List the column number where the state or country abbreviation begins. Answer = >

Step 3. Press F3 to exit the ISPF editor. Then press F3 to exit the ISPF member list.

3.2.2 Coding and Executing MYSORT to Sort by Area Code

Step 4. Creating a new PDS member is probably the most routine task that a system or application programmer will do. In this example, we will create a new RMUXXXX.JCL member in the 3.4 DSLIST panel. Enter an E (Edit) under the Command column. Move the cursor to end of the PDS name and append a new member name, e.g., (MYSORT). Then press the right-ctrl key (ENTER) to execute.

You may get the "Warn of First Data Change" dialog box. Press the right-ctrl key to continue.

Step 5. Type RESET on the ISPF command line and press the right-ctrl. In order to complete the new member process one MUST enter a few lines and either SAVE or F3 Exit and Save. Z/OS will not save an empty member.

JCL for Sorting Data Sets Directly - http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.iceg200%2Fcontras.htm

SORT TUTORIAL - http://www.mainframetutorials.com/drona/programming/languages/jcl/jcl.sort11111.html

DFSORT TUTORIAL - http://www.mainframegurukul.com/srcsinc/drona/programming/languages/jcl/jcl.sort.html

SORT Tips and Tricks and Examples - http://mainframewizard.com/content/sort-tips-and-tricks-and-examples

So enter the following JCL code.

Remember:

· Every JCL command begins with two forward slashes in Columns 1 and 2.

· In column 3 a JOB, STEP or DD name is required.

· Follow the JCL Name field by at least one space before the JCL operator, e.g., JOB, EXEC, or DD.

· Follow the JCL operator by at least one space.

· The JCL parameters must not contain any embedded spaces. All JCL statements should be upper case.

LINE 1 Change the JOB Name from PL1127 to your first-two initials followed by a date.

LINE 2 will execute a z/OS utility program named SORT.

Lines 3 thru 6 will contain DDNAMES (columns 2 thru 8) and associated DD statements that are required by the SORT program, i.e., SORTOUT, SORTIN, and SYSIN.

If you remember a previous COBOL program one coded a statement similar to SELECT MY-COBOL-OUTPUT ASSIGN TO RPTFILE. RPTFILE was a name of DDName that someone must define in JCL. For example the DD statement for RPTFILE must be coded in the JCL to execute the COBOL program. //RPTFILE DD DSN=&SYSUID..MYREPORT,DISP=SHR

Likewise, we must code DD statements for SYSOUT, SORTOUT. SORTIN, and SYSIN for the JCL SORT utility.

3.2.3 Questions – SORTIN and SYSOUT

LINE 3 describes the DDNAME SYSOUT. What is the purpose of the SORT utility SYSOUT DDNAME? Answer = >

LINE 3 also lists SYSOUT=*. What is the purpose of the SYSOUT=*? Answer = >

Likewise, we must create DD statements for SYSOUT, SORTOUT. SORTIN, and SYSIN.

LINE 4 describes the DDNAME SORTOUT. What is the purpose of the SORT utility SORTOUT DDNAME? Answer = >

LINE 5 describes the DDNAME SORTIN. What is the purpose of the SORT utility SORTIN DDNAME? Answer = >

LINE 5 also lists DSN=&SYSUID..JCL(AREACODE). What is the purpose of this DSN parameter? Answer = >

LINE 6 describes the DDNAME SYSIN. What is the purpose of the SORT utility SYSIN DDNAME?

Answer = >

LINE 6 contains the following operator DD * Follow the DD operator by the name of a dataset or predefined system substitution name of a data set name. DD * means that the content will be an "instream" data content or program parameters. In simpler terms, the DDNAME SYSIN requires directions on how to sort. Instead of putting these directions in a separate data set, place the SORT directions inside the JCL member. Look at Line 7 that follows.

LINE 7 does NOT begin will a double slash. Hence, this is instream data content for the execution of the program. In this example, use SYSIN DD * to provide directions on which columns and how to sort.

The content of LINE 7 is SORT FIELDS=(1,3,CH,A)

Sorting Data Sets - http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.iceg200%2Fcontras.htm

After reviewing the following SORT utility input parameters on LINE 7, explain the purpose of "1,3," sub-parameters in the following SORT FIELDS=(1,3,CH,A) Answer = >

After reviewing the following SORT utility input parameters on LINE 7, explain the purpose of sub-parameter "CH" in the following SORT FIELDS=(1,3,CH,A)? Answer = >

After reviewing following SORT utility input parameters on LINE 7, explain the purpose of sub-parameter "A" in the following SORT FIELDS=(1,3,CH,A)? Answer = >

Step 6. On the ISPF command line type SUB;=SD;ST and press ctrl-enter to execute this JCL code.

Step 7. If you have written the correct JCL code and a MAXCC=0000 code is displayed, you should be directed to SDSF. Find the job output with your JOBNAME. Enter a "?" under the NP column to open the SDSF job dataset and list the members (or results) from the job submission. In the following example, the JOBNAME was PL1127. Select your JOBNAME.

Step 8. I hope that you had answered the previous question concerning the purpose of the DDName SYSOUT. To view your sorted output type S under the NP column and press the right-ctrl key.

3.1.4 Document MYSORT by Zipcode

Step 9. Using a snipping tool document the first 10 lines of DDName SORTOUT for the MYSORT Step, which contains your sorted data below =

Which data was sorted, e.g., the first-three digits of the area code or the state/country name? Why? Answer = >

3.3 Code, Execute and Document MYSORT to Sort by State

Step 10. Press F3 several times to exit SDSF and enter =3.4 to re-open your RMUXXXXX.JCL(MYSORT) JCL member. Change Line 7 to the following:

Step 11. On the ISPF command line type SUB;=SD;ST and press ctrl-enter to execute. This will re-submit your JCL job with the new changes.

Step 12. If you have written the correct code and received a MAXCC=0000 code, you should be directed to SDSF. Find the job output with your JOBNAME. Be careful to select the correct job output. Since we had previously submitted two jobs with the same JOB NAME, e.g., PL1127, how will we know which was the most recent job submitted? Select the PL1127 or other JOBNAME with the highest JOBID. Enter a "?" under the NP column and press right-ctrl to open the SDSF job dataset and list the members (or results) from the job submission.

Enter S to select the DDName SORTOUT for Step MYSORT and press right-ctrl to execute.

Step 12. Document the first 10 lines of DDName SORTOUT for the MYSORT Step, which contains your sorted data below =

The data was sorted by which columns? Was the sort order by the first-three digits of the area code or the state/country name? Why? Answer = >

3.4 MRCREM JCL - Using IEBGENER to Create a Dataset Member

Step 13. Create and code a new PDS member using JCL(MRCREM) and the IEBGENER utility.

This next example will require you to create a new PDS member named MYPROCI, which will mean "My JCL Procedure Instream." A JCL Procedure is simply a set of JCL statements that we want to reuse. For example, few of us are qualified to write prefect JCL to compile, link and execute a COBOL program. Therefore, it is typical that someone codes a PROC or procedure and then others will reuse the PROC. Not only does this save time and complexity, others with less JCL experience can re-use the JCL PROC.

The objective of this step is to convert the JCL SORT statements list in Step 10 to a JCL PROC. In this step, we will first use JCL to create a new member and use the IEBGENER utility.

Create a new PDS member is named MYCRMEM, or My Create PDS member, using the 3.4 DSLIST panel. Enter an E (Edit) under the Command column. Move the cursor to end of the PDS name and append a new member name, e.g., (MYCCRMEM). Then press the right-ctrl key to execute.

You may get the "Warn of First Data Change" dialog box. Press the right-ctrl key to ignore and continue.

Type RESET on the ISPF command line and press the right-ctrl to execute. In order to complete the new member process one MUST enter a few lines and either SAVE or F3 Exit and Save. Z/OS will not save an empty member.

IBM Utility programs – IEBGENER - http://jclschool.weebly.com/iebgener.html

IEBGENER - http://www.lascon.co.uk/zOS-file-utilities.php#iebgener

IEBCOPY - http://www.lascon.co.uk/zOS-file-utilities.php#iebcopy

IEFBR14 - http://www.lascon.co.uk/zOS-file-utilities.php#iefbr14

Enter the following JCL code.

LINE 1 Change the JOB Name from PL1129 to your first-two initials followed by a date.

LINE 2 will execute a program named IEBGENER. The IEBGENER utility copies one sequential data set to another. (A member of a partitioned data set may be used as a sequential data set.)

Lines 3 thru 6 will contain DDNAMES and DD statements that are required by the IEBGENER utility.

3.4.1 Questions – IEBGENER, Dummy, SYSPRINT and SYSUT2

LINE 3 describes the DDNAME SYSIN. What is the purpose of the IEBGENER? Answer = >

LINE 3 also lists DD DUMMY. What is the purpose of the parameter named DUMMY data set name? Answer = >

IEBGENER - http://www.lascon.co.uk/zOS-file-utilities.php#iebgener

LINE 4 describes the DDNAME SYSPRINT. What is the purpose of the IEBGENER SYSPRINT DDNAME? Answer = >

LINE 5 describes the DDNAME SYSUT2. What is the purpose of the IEBGENER SYSUT2 DDNAME? Answer = >

LINE 6 describes the DDNAME SYSUT1. What is the purpose of the IEBGENER SYSUT1 DDNAME? Answer = >

INSTREAM DATA - http://www.tutorialspoint.com/jcl/jcl_input_output.htm

INSTREAM and CATALOGED PROCEDURES - http://www.mainframetutorials.com/drona/programming/languages/jcl/jcl.chapter8.html

Basic Sort Tricks - http://www.tutorialspoint.com/jcl/jcl_basic_sort_tricks.htm

LINE 6 also uses DD *. What is the purpose of DD * when using instream JCL data? Answer = >

LINE 9 also uses /*. What is the purpose of "/*" when using instream JCL data? Answer = >

[//* is a JCL comment statement not /*]

Step 14. On the ISPF command line type SUB;=SD;ST and press ctrl-enter to execute MYCRMEM JCL. This command will re-submit your JCL job with the changes.

Step 15. If you have written the correct code and received a MAXCC=0000 code, you should be directed to SDSF. Find the job output with your JOBNAME. Be careful to select the correct job output. Since we had previously submitted two jobs with the same JOB NAME, e.g., PL1129, how will we determine which was the most recent job submitted? The answer is the PL1129 JOGNAME with the highest JOBID. Enter a "?" under the NP column to open the SDSF job dataset and list the members (or results) from the job submission.

You may enter S, to select the DDName SYSPRINT, which contains the IEBGENER system messages. For this simple utility, if the SYSPRINT DDNAME is listed this normally is associated with a MAXCC=0000 condition.

3.4.2 Document MYCREM JCL Output

Step 16. Navigate to your JOB. Document the output for your DDname SYSPRINT for STEP 1 below =

The MYCRMEM JCL was designed to introduce the IEBGENER utility to copy instream data to a new PDS member. The "in-stream" text that was copied into that new member MYPROCI was just a sample. Your MYPROCI should look similar to the result below. In the next step we will 1) copy the MYSORT JCL utility into the MYPROCI JCL, and 2) modify the JCL code to introduce the concept of an Instream JCL Procedure

3.5 Three Methods to COPY A PDS MEMBER

Step 17. Copy your SORT JCL code into your RMUXXXX.JCL(MYPROCI) member. You can copy the content of one PDS member by using one of three methods.

3.5.1 Use the ISPF MOVE/COPY utility.

This method may be clumsy at times. While we start by entering a C on the Option line, one will not be able to use the fill-in-the-blanks format FROM ISPF LIBRARY. It is required to must specify the source member name. This utility assumes that the source is always in the format of HLQ.DDD.DDD(MMMMM). We will not use this PDS member copy member method in this example.

3.5.2 Use the IEBGENER utility.

SYSUT1 in Line 5 was changed from our previous example from DD * - designed to instream data to DD DISP=SHR,DSN=&SYSUID..JCL(MYSORT). This method is a little clumsy also. We will not use this PDS member copy member method in this example.

3.5.3 Use the ISPF Edit COPY primary command.

This method is normally the easiest to use for copy JCL or application code. It will be demonstrated in the next requirement.

3.6 MYPROCI – Code, Execute and Document an Instream data JCL PROCEDURE

The JCL Procedures are set of statements inside a JCL grouped together to perform a particular function. Usually, the fixed part of the JCL is coded in a procedure. The varying part of the Job is coded within the JCL.

You can use a procedure to achieve parallel execution of a program using multiple input files. A JCL can be created for each input file, and a single procedure can be called simultaneously by passing the input file name as a symbolic parameter https://www.tutorialspoint.com/jcl/jcl_procedures.htm

Video - JCL Procedures – PROCS (Tutorials Point Series)

https://www.tutorialspoint.com/jcl_online_training/jcl_procedures.asp

Video - 6.5.2 JCL Procedures Text Link (Tutorials Point Series)

https://www.tutorialspoint.com/jcl/jcl_procedures.htm

Video -6.5.3 JCL Tutorial Part 7 Procedures (Kumar IT Channel)

https://www.youtube.com/watch?v=ABRpIiXyPTc&list=PLLcYGaQ7eeuQv-n9FtIqYCxkvvDdgL6VD&index=6

JCL – Procedures - http://www.tutorialspoint.com/jcl/jcl_procedures.htm

3.6.1 Code the MYPROCI Procedure

Use the ISPF EDIT Primary Command. In STEP 16, you were instructed to open the RMUXXXX.JCL(MYPROCI) data set member. Type either A or B on a line (for either After or Before) to indicate where the copied line code should be placed.

Type the member name to be copied. [This example only pertains to copy a 'from' member to a 'to' member in the same PDS dataset.] Press the right-ctrl key to execute the COPY.

The result should look similar to the following.

This method can be also used to copy member between two different PDSs. Assume that your instructor wants you to copy the same JCL into your PDS member from RMU.JCL(MYSORT). The ISPF Edit command would be the following. [Notice the single quotes. Surrounding a dataset member with single quotes means that the source member will be found in a different dataset. DO NOT PERFORM THIS EXAMPLE.

Step 18. Edit and enter the following MYPROCI code.

When the procedure is coded within the same JCL member, it is called an Instream Procedure. It should start with a PROC statement and end with a PEND statement.

The previous JCL code includes an in-stream PROC (JCL Procedure) declared Lines 4 to 9. An in-stream PROC begins with a PROC or PROCEDURE statement which defines the PROC name, e.g., the MYPROC DDNAME. When a COBOL compile-link-go JCL was demonstrated in a previous assignment, the IGYWCLG JCL Procedure was used (EXEC IGYWCLG). If we would have written the IGYWCLGPROC, the code would be similar to Line 4, e.g., //IGYWCLG PROC instead of our example //MYPROC PROC.

A PROCEDURE can be executed one of two ways: External PROCs (two separate JCL members or one JCL member - an in-stream PROC. An in-stream PROC must be declared BEFORE the PROC is used in Line 12. An in-stream PROC must end with the PEND statement. A catalogue PROC will be demonstrated next. The PEND statement will be optional since the PROC will be declared in separate PDS member than the JCL member that calls or invokes it.

Carefully review Lines 8, 12 and 14. Any JCL identifier that begins with an ampersand, i.e., &, is a substitution variable. In a previous assignment the substation variable &SYSUID coded on Line 1 was discussed. When the JCL is execute, z/OS will substitute the USERID of the person who submitted the job. In Line 8 the substitution variable &SORTDSN is declared. When the PROC is executed in Lines 12 and 14, the substitution variable SORTDSN must be defined before a call to the PROC named MYPROC. In this example, the &SYSUID..JCL(AREACODE) will be substituted or use in &SORTDSN. Therefore, the MYRPOC Procedure requires the calling JCL to provide the name of the data set to be sorted.

By using substitution variables, the same JCL PROC can be re-used by any calling JCL. Just provide the name of the data set to be sorted and MYRPOC will sort it

MYPROC is executed twice . Once in //STEP1 (Line12), which will sort by the first three characters, and then in //STEP2, which will sort by characters 6 thru 10.

Step 19. On the ISPF command line type SUB;=SD;ST and press ctrl-enter.

Step 20. If you have written the correct code and received a MAXCC=0000 code, you should be directed to SDSF. Find the job output with your JOBNAME. Be careful to select the correct job output. Since we had previously submitted two jobs with the same JOB NAME, e.g., PL1129, how will can one determine which was the most recent job submitted? The answer is the PL1129 JOBNAME with the highest JOBID. Enter a "?" under the NP column to open the SDSF job dataset and list the members (or results) from the job submission. Your JOB should appear similar to the following

Notice that there are two DDNames for SORTOUT listed, i.e., once for Step1 and a second for Step 2. The reason for this is MYSORT PROC is called twice.

3.6.2 Document MYPROCI – Coding an Instream JCL Procedure

Navigate to your JOB. Document the first 10 lines of your DDname SORTOUT for STEP 1 below =

Navigate to your JOB. Document the first 10 lines of your DDname SORTOUT for STEP 2 below =

3.7 MYPROCC – Coding a Catalog JCL Procedure

When the procedure is separated out from the JCL and coded in a different data store, it is called a Cataloged Procedure. A PROC statement is not mandatory to be coded in a cataloged procedure.

Step 21. Creating a catalog procedure (PROC) (Page 366 of text book). In this example, we will separate MYPROCI (our in-stream PROC) into two separate members, which will be named MYPROCC and MYPCALL. By separating the PROC into a separate PDS member any JCL code may use the PROC.

Create a new member named MYPROCC. The appended "C" stands for cataloged and previously appended "I" means an in-stream procedure.

You may get the "Warn of First Data Change" dialog box. Press the right-ctrl key to ignore and continue.

Type RESET on the ISPF command line and press the right-ctrl. In order to complete the new member process one MUST enter a few lines and either SAVE or F3 Exit and Save. Z/OS will not save an empty member.

Type either A or B one a line (for either After or Before) to indicate where the copied code should be placed.

Type the member name to be copied. [This example only pertains to copy a 'from' member to a 'to' member in the same PDS dataset.] Press the right-ctrl key to execute the COPY.

Step 22. Edit and enter the following JCL code to create a cataloged procedure (PROC).

First, notice that a catalog PROC contains NO JOB statement. The reason for no JOB statement is that a cataloged PROCEDURE will not be submitted for a JOB. Rather, it will be called by another JOB, i.e., MYPCALL JCL, which we will code in the next step.

Second, to distinguish the cataloged PROC from other PROCs we will code it with a unique DDname, e.g., MYPROCC. While PROC DDNames are not required to be unique there may some confusion when there duplicate PROC DDnames within the same JCL library or PDS data set.

Third, the PEND statement is optional within a catalog PROC since the code ends automatically at the end of the JCL code.

Document your MPPOCC Catalog Procedure below =

3.8 MYPCALL – Calling a Catalog JCL Procedure

Step 23. Create a JCL member that will call the catalog procedure (PROC), i.e., MYPCALL. Create a new member named MYPCALL.

You may get the "Warn of First Data Change" dialog box. Press the right-ctrl key to ignore this and continue.

Type RESET on the ISPF command line and press the right-ctrl. In order to complete the new member process one MUST enter a few lines and either SAVE or F3 Exit and Save. z/OS will not save an empty PDS member.

Type either A or B one a line (for either After or Before) to indicate where the copied code should be placed.

Type the member name to be copied. [This example only pertains to copy a 'from' member to a 'to' member in the same PDS dataset.] Press the right-ctrl key to execute the COPY.

3.8.1 JCLLIB Statement

Video - JCL Libraries (Tutorials Point Series)

https://www.tutorialspoint.com/jcl_online_training/jcl_libraries.asp

Video - JCL Libraries Text Link (Tutorials Point Series)

https://www.tutorialspoint.com/jcl/jcl_base_library.htm

Video - JCL Hands-on JCLIB and STEPLIB (Kumar IT Channel)

https://www.youtube.com/watch?v=ChaQ0ZtGLbE

JCLLIB Statement - http://pic.dhe.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.ieab600/iea2b690646.htm

Examples of the JCLLIB Statement - http://pic.dhe.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.ieab600/iea2b690655.htm

Step 24. Edit and enter the following JCL code to create a MYPCALL to call the cataloged procedure named MYPROCC.

First, one will notice that this JCL member code will have only one JOB statement. This will be the JOB that we will submit to execute or call the cataloged PROC named MYPROCC. The JOB DDname was changed to MYPCALL to make it simpler to find in SDSF, but the JOB DDname belongs to you.

Second, Line 2 introduces the JCLLIB statement. We need to tell z/OS where to locate cataloged JCL Procedures. The system programmer provides an automatic search order to tell z/OS where to find the JCL PROCs. In this example we need to give z/OS to find our PROCEDURE, since z/OS does not know where we stored the PROC. Therefore, we are going to tell z/OS where to find our PROC in our private JCL library. Remember, a library is simply a name of a partitioned data set. The ORDER parameter provides the name of one or more partitioned data sets and the order to search these PDSs.

Step 25. Submit your MYPCALL JCL. DO NOT submit your MYPROCC JCL member. On the ISPF command line type SUB;=SD;ST and press ctrl-enter.

Step 26. If you have written the correct code and received a MAXCC=0000 code, you should be directed to SDSF. Find the job output with your JOBNAME. Be careful to select the correct job output. Your JOB should appear similar to the following.

3.8.2 Document the Execution of MYPCALL (Procedure Call)

Navigate to your most recent JOB submission. Document the first 10 lines of your DDname SORTOUT for STEP 1 below =

Document the first 10 lines of your DDname SORTOUT for STEP 2 below =

3.9 MYPROCO – Overriding a Catalog JCL Procedure

Step 27. JCL PROC Overrides (Page 255 text book). The advantage of using a PROC is that a developer can re-use JCL Procedure code previously developed and slightly modify its execution. This will same time and hide the complexity of the JCL. The disadvantage of using a PROC is that it might not do exactly what you want it to do. This is frequently the case when a user wants to redirect the output to a different location or replace a procedure step.

Create a JCL member that will illustrate a PROC override, i.e., MYPROCO. Create a new member named MYPROCO.

You may get the "Warn of First Data Change" dialog box. Press the right-ctrl key to ignore and continue.

Type RESET on the ISPF command line and press the right-ctrl. In order to complete the new member process one MUST enter a few lines and either SAVE or F3 Exit and Save. Z/OS will not save an empty member.

Type either A or B one a line (for either After or Before) to indicate where the copied code should be placed.

Type the member name to be copied. [This example only pertains to copy a 'from' member to a 'to' member in the same PDS dataset. ] Press the right-ctrl key to execute the COPY.

Step 28. Edit and enter the following JCL code to OVERRIDE the DDName SORTOUT. The second job step STEP2 was omitted.

The JOBname in Line 1 was changed to MYPROCO to make it easier to find in SDSF. This is not required.

The original PROC statement for the DDName SORTOUT (Line7) was //SORTOUT DD SYSOUT=*

Where does keyword SYSOUT=* direct its output to? Answer = >

The override is coded on Line 13. It starts out with MYSORT.SORTOUT, or STEPNAME.DDNAME. Remember the STEP Name is found with an EXEC statement. Review Line 5. The DDname is found on a DD statement. Review line 7.

The override will simply redirect the output form SYSOUT=* to DSN=&SYSUID..JCL(ASSIGN5) - a member name. The output will NOT be directed to SDSF, but rather be overridden and directed to a PDS member name,

Step 29. Submit your MYPROCO JCL. On the ISPF command line type SUB and press ctrl-enter to execute.

If you have written the correct code and received a MAXCC=0000 code, there is no reason to go to SDSF since the output was redirected to your JCL PDS file. Navigate to your RMUXXXX.JCL(ASSIGN5) PDS member . Document the data set name and the first 10 lines of this member below =

3.9.1 Difference between Substitution Variables and PROCEDURE OVERRIDES

What are the differencesbetween a substitution variable, e.g., &SORTDSN, and a PROC override? Substitution variables represent the REQUIRED data input to the PROC or JCL in order to execute. Without the values stored in a substitution variable the PROC or JCL cannot execute. Substitution variables provide flexibility to execute the PROC or JCL under various conditions or values.

On the other hand, a PROC override is NOT required, or optional. A PROC override permits the calling JCL to replace existing PROC JCL code. While both substitution variables and PROC overrides provide flexibility when designing JCL code, PROCs overrides replace while substitution variables customized.

3.9 Questions - JCL Procedure Review

1. What is a cataloged procedure? Answer = >

2. What is the advantage of a cataloged procedure? Answer = >

3. What is an in-stream procedure? Answer = >

4. What doesn't a cataloged procedure contain a JOB statement? Answer = >

JOBLIB / STEPLIB - http://www.mainframegurukul.com/srcsinc/drona/programming/languages/jcl/jcl.chapter3.html

JCL DD statements: Identify program libraries with JOBLIB or STEPLIB - http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zjcl/zjclc_jclxxxlibDDstmts.htm

JCLLIB versus JOBLIB http://www.allinterview.com/showanswers/37471.html

5. What are the differences between a JOBLIB statement and a JCLLIB statement? Answer = >

6. What are the differences between a JOBLIB statement and a STEPLIB statement? Answer = >

7. A JCL identifier begins with an ampersand (&). What is the function of the JCL ampersand (&)? Answer = >

8. What is the function a PROC Override? Answer = >

9. What is the function of a JCL substitution variable? Answer = >

10. What is the function of a PROC override variable? Answer = >

4.0 Introduction to z/OS UNIX System Services (USS) and zLinux

Video - Unix System Services (USS) - Unit-09- http://youtu.be/xX7OQddddPE

IBM Paul Newton's presentation and demonstration of the role of Unix System Services (USS) as an open operating system capable of web enabling all applications, and simultaneously using z/OS and USS applications , data sets and data files.

See Blackboard Folder "Paul Newton's z System Presentations" for a copy of this Presentation

z/OSMF

http://publib.boulder.ibm.com/infocenter/ieduasst/stgv1r0/topic/com.ibm.iea.zosmf/zosmf/1.13/Overview/zOS_V1R13_zOSMF-Overview.pdf

Overview of z/OSMF - http://publib.boulder.ibm.com/infocenter/zosmf/vxrx/index.jsp?topic=%2Fcom.ibm.zosmf.configguide.help.doc%2FIZUHPINFO_OverviewMain.html

Video - z/OSMF V1.12: The new control center for WLM http://www.youtube.com/watch?v=8AaDxordGJM

ISHELL command (ish)

http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zconcepts/zconcepts_145.htm

OMVS command shell session http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zconcepts/zconcepts_145.htm

In 2001, IBM announced support for UNIX or Unix System Services (USS). USS is a component of z/OS; whereas, zLinux is a separate operating system from z/OS and it runs in a separate LPAR or VM. Web Sphere Java, C/C++, z/OS HTTP Server, z/OS SSHD Server and other TCP/IP servers rely on USS. The design goal of USS was to integrate UNIX into z/OS subsystems, not to make z/OS a standard internet application server, e.g., SMTP, HTTP, POP, POP3, etc. These applications can be better supported by zLinux or other distributed versions of UNIX or Linux.

USS can be access directly using standard Telnet and SHH clients, e.g. PuTTY. Direct access will appear similar to any text-based UNIX command shell. On the other hand, USS can also be access through two TSO command shell facilities: OMVS and ISHELL. This section will introduce UNIX commands using OMVS and ISHELL

Sixteen years ago, the future of Linux, then a new software phenomenon, was hanging in the balance. IBM rode to its rescue by endorsing it for the mainframe. The IBM seal of approval removed doubts among enterprise users about the viability of using Linux and other open source code in the data center. Now, IBM is hoping Linux will, in turn, ride to the rescue of the mainframe.

With all the ballyhoo it can muster, IBM announced Aug. 17 at LinuxCon North America 2015 in Seattle that something new and exciting is happening with Linux: Ubuntu will run on a mainframe. The LinuxONE mainframe hardware has been designed for the Canonical version of Linux.

The servers include LinuxONE Emperor, which IBM claimed can scale up to 8,000 virtual machines or hundreds of thousands of containers, and Rockhopper, which is designed for midsize businesses. The LinuxONE Emperor system will be based on IBM's z13 mainframe.

How is Ubuntu running on the mainframe different from Red Hat running on the mainframe? Or from SUSE, the first Linux for the mainframe, produced back in 2000?

For starters, Ubuntu is a version of Linux that is popular with developers and many end users. Developers like the fact that the Debian kernel, on which Ubuntu is based, is more in step with the Linux kernel development process led by Linus Torvalds. Red Hat Enterprise Linux, with its emphasis on testing and stability, tends to lag the process.

SUSE Linux traditionally is big-server Linux. Ubuntu, on the other hand, is popular on x86 hardware. If you're talking about "low-cost mainframe," a term many customers are skeptical of, it helps to utter "Ubuntu" in the same breath. The emphasis du jour is Ubuntu.

Let's face it. It's past time to come up with a new market for the mainframe, which has long been IBM's cash cow. The mainframe is a wonderful, albeit expensive, machine. It concentrates CPU and memory together with high speed I/O channels for high-volume data exchanges. To the best of my knowledge, IBM has tried to keep the pricing on entry-level mainframes in step with high-end UNIX servers. By bringing out an Ubuntu mainframe, it may be able to hover below that pricey bar.

A Mainframe cannot run Linux natively. This means that Linux cannot directory as a LPAR. A Type Hypervisor like z/VM virtualization is required by default on IBM System z. Linux on z System gives the flexibility of running Linux with the advantages of mainframe hardware. Using virtualization, numerous smaller servers can be combined onto one mainframe, gaining some benefits of centralization, but allowing specialized servers thanks to virtualization support, which can lower operating costs.

Linux on z System is not appropriate for small businesses that would have fewer than about 10 distributed Linux servers, although some expensive per-processor licensed software can quickly reduce that rule of thumb. On the other hand, the integration of multi-layer virtualization capabilities of LPAR and z/VM, allows z Systems to deploy hundreds or thousands of Virtual Machines within a single physical system. The security and performance advantages z/VM and z/Linux dwarfs other virtualization solutions. The cost breakeven point is estimated to be two hundred zlinux VMs and the estimated cost savings are estimated to at 45% at 1,000+ VMs

Chapter 4. TSO/E, ISPF, and UNIX: Interactive facilities of z/OS. Introduction to the New Mainframe

z/OS UNIX System Services - http://en.wikipedia.org/wiki/UNIX_System_Services

z/OS UNIX System Services - http://www.mainframes.com/Unix.html

Linux on z System - http://en.wikipedia.org/wiki/Linux_on_System_z

What are Unix Shells? http://www.tutorialspoint.com/unix/unix-shell.htm

4.1 Questions – UNIX and UNIX System Services

1. What is UNIX Shell? Answer = >

2. What is function of the Unix Shell prompt? Answer = >

3. What is a UNIX or Linux Shell Script? Answer = >

4. List at least three reasons why the integration of UNIX and z/OS a powerful combination? Answer = >

5. What is function of Telnet? Answer = >

6. What is the function of FTP? Answer = >

7. What is the function of SSH? Answer = >

Chapter 4: TSO/E, ISPF, and UNIX: Interactive facilities of TSO: Introduction to the Mainframe: z/OS basics

4.2 Advantages of z Systems UNIX System Service Compared of UNIX operating systems

8. Check either the Yes or No columns in the following table concerning the integration the integration of USS and z/OS

System Advantage for USS and z/OS

Yes

No

Support of the Unix File System, e.g., hierarchical subdirectories, Unix file permissions, etc.

Support of the z/OS File System, e.g., PDS, VSAM, Catalogs, etc.

Support of ASCII, Unicode and ECBDIC applications

Support of the Linux compiled applications

ISPF can edit Unix files

Accessing z/FS and z/OS subsystem using standard internet clients, e.g. Telnet, Putty, FTP, SSH etc.

4.3 Questions - OVMS

9. What are the functions of the z/OS OMVS command shell processor? Answer = >

The zEnterprise EC12 Raises Enterprise Security While Boosting Analytics and Cloud Performance - http://ibmsystemsmag.com/mainframe/trends/security/security_zec12/

To start OMVS from ISPF (you can also start OMVS from TSO).

Step 1 At the ISPF Primary option menu type 6 to start the ISPF Command Shell. The ISPF Command Shell permits one to execute TSO commands without exiting ISPF.

Step 2. At the command prompt type OMVS which will start a z/OS OMVS Command Shell UNIX session where you may enter a UNIX command.

MVS does not appear like a normal UNIX command shell. OMVS is designed to provide easy access to USS from z/OS. Many preferred using Putty to access USS instead of using OMVS.

The ISPF (TSO) Command Shell will provide a history list of previous commands execute (including your typos).

The next time you start OMVS, your previously entered TSO commands will be listed. Position the cursor anywhere on any history list command, press right-ctrl to retrieve, and the command will be copied from the history list to the command line. If necessary edit the retrieve command, e.g., correct your typos or enter other parameters, and press right-ctrl to execute.

An OMVS session screen similar to the following will be displayed. You are now ready to enter UNIX commands.

This is OMVS command prompt, where one enters UNIX commands TO BE EXECUTED after one press right-ctrl

This area in where UNIX commands are normally entered, but not used in the OMVS shell. It will display the command that was successfully executed.

This is UNIX command prompt

10. Use the Snipping Tool to document your OMVS command shell session below =

11. Use the Snipping Tool to document ONLY your UNIX command prompt below =

Important. Almost all of the UNIX commands may be executed in any version of Linux.

Type the UNIX id command and press right-ctrl to execute. (All UNIX commands are case sensitive.)

12. Use the Snipping Tool to document ONLY the results of the execution of your UNIX id below =

UNIX uses a different system to identify users and group membership than z/OS. You can review the following links for more information.

User identifier - http://en.wikipedia.org/wiki/User_identifier

id (Unix) - http://en.wikipedia.org/wiki/Id_%28Unix%29

4.3 OEDIT - Creating and editing a file in OMVS?

UNIX users normally have a variety of UNIX text editors. The most historic and popular UNIX editor is called vi. IBM provides a more familiar text editor for z/OS users called oedit (lower-case please)

Type oedit rmuxxxxmyfile, where xxxx is your z/OS userid, and press the right-ctrl to execute.

The following z/OS text editor should appear. Type and execute the RESET command to clear any message lines.

There are two important features to notice.

1. We were not required to allocate our UNIX file before we could edit the file. In z/OS you are required to allocate a data set before use.

2. The file system rules UNIX files are different that z/OS. There is no user catalog, but there is a subdirectory based on your z/OS userID. z/OS does not use subdirectories to organize data sets , rather, it uses partitioned data sets, VTOCs and catalogs. In some features USS is very similar to Windows, Linux, and other modern operating systems. But, you will not see this file displayed in ISPF Data set view (3.4)

Using ISPF enter your name on the first line, your email address on the second line, and some of your words of wisdom on the third line. When finished press F3 to exit and save.

Use oedit to create two more UNIX files with a filename that starts with your z/OS userID. The rules for naming UNIX and LINUX files are provided. Each file should contain any five lines of text you want.

4.4 Linux / UNIX: Rules For Naming File And Directory Names

· All file names are case sensitive. So filename vivek.txt Vivek.txt VIVEK.txt all are three different files.

· Spaces are permitted, excepted when escaped.

· You can use upper and lowercase letters, numbers, "." (dot), and "_" (underscore) symbols.

· You can use other special characters such as blank space, but they are hard to use and it is better to avoid them.

· In short, filenames may contain any character except / (root directory), which is reserved as the separator between files and directories in a pathname. You cannot use the null character.

· No need to use . (dot) in a filename. Sometimes a dot improves readability of filenames. And you can use dot based filename extension to identify the type or content of the file. For example: .sh = Shell file, or .tar.gz = Compressed archive

· Most modern Linux and UNIX limit filename to 255 characters (255 bytes). However, some older version of UNIX system limits filenames to 14 characters only.

· A filename must be unique inside its directory. For example, inside /home/vivek directory you cannot create a demo.txt file and demo.txt directory name. However, other directory may have files with the same names. For example, you can create demo.txt directory in /tmp.

· Linux / UNIX: Reserved Characters And Words Avoid using the following characters from appearing in file names: / > < | : &

· Please note that Linux and UNIX allows white spaces, <, >, |, \, :, (, ), &, ;, as well as wildcards such as ? and *, to be quoted or escaped using \ symbol.

4.5 Document OBROWSE command

Use the OMVS obrowse command to view your first file. Normally, UNIX users use the cat command to display the contents of a file. This will be illustrated next.

13. Use the Snipping Tool to document the results of your OMVS obrowse command below =

4.6 Document UNIX cat Command

Press F3 to exit and return to OVS.

Use the cat command to display the contents of a file.

14. Use the Snipping Tool to document the results of your UNIX cat command below =

15. What are the differences between the OMVS obrowse command and the UNIX cat command? Answer = >

4.7 Document UNIX Commands

UNIX - Useful Commands - http://www.tutorialspoint.com/unix/unix-useful-commands.htm

Basic UNIX commands - http://mally.stanford.edu/~sr/computing/basic-unix.html

16. Document of the results of execution for each of the following UNIX commands using the following table.

Unix command

Use the SNIPPING Tool to Document the Execution

man ls

ls

ls - l

date

cal 2015

touch file1

touch file2

man mkdir

mkdir mydir

man ls

ls -l

rm file1

4.8 Explain UNIX Commands

17. Explain the function of the following UNIX commands using the following table.

Unix command

Explain the function for the following Unix command

man ls

ls

ls - l

date

cal 2015

touch file1

touch file2

man mkdir

mkdir mydir

man ls

ls -l

rm file1

Type exit and exit the OMVS UNIX command shell

In the ISPF press F3 to exit ISPF.

End of Assignment 2 Hands-on

Page 90 | 90