Presentation is loading. Please wait.

Presentation is loading. Please wait.

MVS (Day 2). Copyright © 2005, Infosys Technologies Ltd 2 ER/CORP/CRS/OS01/003 Version No: 1.0 Agenda Data Management –Definition of data set and Record.

Similar presentations


Presentation on theme: "MVS (Day 2). Copyright © 2005, Infosys Technologies Ltd 2 ER/CORP/CRS/OS01/003 Version No: 1.0 Agenda Data Management –Definition of data set and Record."— Presentation transcript:

1 MVS (Day 2)

2 Copyright © 2005, Infosys Technologies Ltd 2 ER/CORP/CRS/OS01/003 Version No: 1.0 Agenda Data Management –Definition of data set and Record Formats –Describe the organization of data sets –VSAM and Non-VSAM –VSAM Performance Tuning –MVS label processing –Storage Management Subsystem Job Management –What is a “job” ? –How does JCL specify its processing requirements ? –Job Entry Subsystem - overall responsibility for job management. –Phases a job goes through as it is processed. –Sample output of messages & results.

3 Copyright © 2005, Infosys Technologies Ltd 3 ER/CORP/CRS/OS01/003 Version No: 1.0 Data sets A data set is mainframe term denoting a file - –With in a data set, data is organized into smaller units called records, which can be processed individually by application programs –MVS keeps track of data through labels, catalogues and different data set organizations

4 Copyright © 2005, Infosys Technologies Ltd 4 ER/CORP/CRS/OS01/003 Version No: 1.0 VARIABLE BLOCKED 1 LOGICAL 1 PHYSICAL FIXED UNBLOCKED LOGICAL FIXED BLOCKED 4 B BL 4 B RL RECORD VARIABLE UNBLOCKED UNDEFINED Record Formats BLRL RECORDRL RECORD …

5 Copyright © 2005, Infosys Technologies Ltd 5 ER/CORP/CRS/OS01/003 Version No: 1.0 BLOCK(physical record) logical record INTER BLOCK GAP (IBG) All logical records are the same size limit 32,760. All blocks are the same size (except the last one) limit 32,760. Fixed Block Format

6 Copyright © 2005, Infosys Technologies Ltd 6 ER/CORP/CRS/OS01/003 Version No: 1.0 BLOCK LOGICAL RECORD 4444 BLOCK DESCRIPTOR WORD (4 BYTES) INTER BLOCK GAP 4 RECORD DESCRIPTOR WORD (4 BYTES) Logical records in a block can have different sizes. The first four bytes define the size of each record. Limit 32,756 bytes. Blocks can have different sizes. The first 4 bytes of each block define its size. Limit 32,760 bytes. Variable Blocked Format

7 Copyright © 2005, Infosys Technologies Ltd 7 ER/CORP/CRS/OS01/003 Version No: 1.0 BLOCK INTER BLOCK GAP Blocks can be of any size up to the limit of 32,760 bytes. Logical records do not exist. Undefined Format

8 Copyright © 2005, Infosys Technologies Ltd 8 ER/CORP/CRS/OS01/003 Version No: 1.0 VSAM and Non-VSAM Two different data management environments : –VSAM Virtual storage access method required utility called Access Method Services to create VSAM data sets. ESA SMS (Storage Management Services) allows creation of VSAM data sets through JCL –Non-VSAM Older method File can be created by JCL specifications

9 Copyright © 2005, Infosys Technologies Ltd 9 ER/CORP/CRS/OS01/003 Version No: 1.0 Non-VSAM Data Set Organizations PHYSICALLY SEQUENTIAL PARTITIONED (PDS) DIRECT ACCESS INDEXED SEQUENTIAL NON- VSAM

10 Copyright © 2005, Infosys Technologies Ltd 10 ER/CORP/CRS/OS01/003 Version No: 1.0 Physical sequential (PS) data sets … Records stored one after another in consecutive sequence - –a data element within record can contain key value that’s used to sequence records Random access of data not possible Suitable for just about any type of I/O device

11 Copyright © 2005, Infosys Technologies Ltd 11 ER/CORP/CRS/OS01/003 Version No: 1.0 PHYSICALLY SEQUENTIAL DATA SETS CAN RESIDE ON ALMOST ANY STORAGE DEVICE IT’S THE ONLY DATA SET ORGANIZATION WHICH CAN EXIST ON MAGENITIC TAPE. THIS IS THE ORGANIZATION DEFAULT, SO AN ACCESS METHOD NEED NOT BE CODED. HOWEVER, DSORG=PS, CODED ON A DCB, WILL EXPLICITLY REQUEST AN ACCESS METHOD. Physical Sequential

12 Copyright © 2005, Infosys Technologies Ltd 12 ER/CORP/CRS/OS01/003 Version No: 1.0 Partitioned data sets (PDS) … Divided into one or more members, each of which can be processed as if it were a separate physical sequential file. Each members name is stored in a directory. Also called a PDS or library. Entire library can be processed a unit. Widely used by MVS to store system data.

13 Copyright © 2005, Infosys Technologies Ltd 13 ER/CORP/CRS/OS01/003 Version No: 1.0 PDS …

14 Copyright © 2005, Infosys Technologies Ltd 14 ER/CORP/CRS/OS01/003 Version No: 1.0 DEPT01.........................................................LOCATION DEPT02.........................................................LOCATION DEPT03.........................................................LOCATION DEPT01DEPT02DEPT03 ACCOUNTS PDS …

15 Copyright © 2005, Infosys Technologies Ltd 15 ER/CORP/CRS/OS01/003 Version No: 1.0 ENTRY FOR MEMBER A ENTRY FOR MEMBER B MEMBER A MEMBER B PDS …

16 Copyright © 2005, Infosys Technologies Ltd 16 ER/CORP/CRS/OS01/003 Version No: 1.0 MEMBER NAMETTRCOPTIONAL USER DATA TTRN TTRN TTRN POINTER TO FIRST RECORD OF MEMBER 3 8 0-31 MAX 62 BYTES ‘1’ IF ALIAS NO. OF USER DATA TTRN’S NO. OF USER DATA HALF WORDS PDS

17 Copyright © 2005, Infosys Technologies Ltd 17 ER/CORP/CRS/OS01/003 Version No: 1.0 Direct data sets Each record can be accessed at random based on records’ disk location. Isn't commonly used because of programming complexities involved in calculating disk addresses.

18 Copyright © 2005, Infosys Technologies Ltd 18 ER/CORP/CRS/OS01/003 Version No: 1.0 Indexed sequential data sets … Records can be accessed sequentially & randomly using a index that relates key field values to locations of corresponding data record. Random access of records based on key value possible.

19 Copyright © 2005, Infosys Technologies Ltd 19 ER/CORP/CRS/OS01/003 Version No: 1.0 FIRST NAME LAST NAME EMPLOYEE NUMBER THOMAS BLUESTONE 00008 WILLIAMS COLLINE 00002 RONALD GARCIA 00010 STANLEY ABBOTT 00001 EMPLOYEE DISK NAME LOCATION 00001 5 00002 2 00008 7 00010 1 INDEX COMPONENT DATA COMPONENT Indexed Sequential data sets

20 Copyright © 2005, Infosys Technologies Ltd 20 ER/CORP/CRS/OS01/003 Version No: 1.0 VSAM Design Objectives Operating System independence Device independence Data integrity Data security File performance Uses of VSAM VSAM is the choice for high performance, random access applications. VSAM is ideal for CICS, IMS and batch databases. VSAM is used for a large part of the data that MVS creates and/or uses.

21 Copyright © 2005, Infosys Technologies Ltd 21 ER/CORP/CRS/OS01/003 Version No: 1.0 VSAM data sets Entry-sequenced data set ( ESDS ) –Similar to physical sequential files but can reside only on DASDs. Key-sequenced data set ( KSDS ) –Similar to indexed sequential data set –Most common Relative record data set ( RRDS ) –Similar to a direct data set –retrieve record by specifying its location relative to start of the file Linear Dataset

22 Copyright © 2005, Infosys Technologies Ltd 22 ER/CORP/CRS/OS01/003 Version No: 1.0 VSAM Data Set Organization ENTRY-SEQUENCED KEY-SEQUENCED RELATIVE RECORD VSAM LINEAR RECORD

23 Copyright © 2005, Infosys Technologies Ltd 23 ER/CORP/CRS/OS01/003 Version No: 1.0 VSAM Performance Tuning Control Interval Size Free space Buffer space

24 Copyright © 2005, Infosys Technologies Ltd 24 ER/CORP/CRS/OS01/003 Version No: 1.0 MVS label processing Labels are special records in data sets used by MVS to identify data sets. DASD labels - –Volume labels ( VOL1 label ) provides a volume-serial ( unique, 6 character ) address of VTOC –File labels VTOC : Special file that contains file labels of data sets on the volume

25 Copyright © 2005, Infosys Technologies Ltd 25 ER/CORP/CRS/OS01/003 Version No: 1.0 MVS label processing File labels are also called DSCBs (data set control blocks), have several formats: –Format 1 DSCB : gives data set name, etc., –Format 5 DSCB : describes VTOC Space allocated to DASD files in areas called extents - initial primary extent, then one or more secondary extents as file grows ( records are added ).

26 Copyright © 2005, Infosys Technologies Ltd 26 ER/CORP/CRS/OS01/003 Version No: 1.0 MVS label processing

27 Copyright © 2005, Infosys Technologies Ltd 27 ER/CORP/CRS/OS01/003 Version No: 1.0 DSCB Formats Format 1 DSCB : primary extent and three secondary extents Format 3 DSCB : thirteen additional extents Format 5 DSCB : defines upto 26 free extents

28 Copyright © 2005, Infosys Technologies Ltd 28 ER/CORP/CRS/OS01/003 Version No: 1.0 MVS Catalogs Catalogs record location of files so that its volume-serial need not be specified to locate it. Master catalogs : –entries that identify system data sets & –entries that identify user catalogs User catalogs : –entries that identify user data sets

29 Copyright © 2005, Infosys Technologies Ltd 29 ER/CORP/CRS/OS01/003 Version No: 1.0 MVS Catalogs

30 Copyright © 2005, Infosys Technologies Ltd 30 ER/CORP/CRS/OS01/003 Version No: 1.0 VTOC ABE.FILE1 ABE.FILE2. USER.CATALOG. TST.PST TST.SEC ABE.FILE1 3390 111111 ABE.TP1 3480 503308 ABE.TP2 3480 566637 ABE.TP3 3480 503984 FILEX.TT 3480 900035 TST.LIBA 3390 222222 TST.LIBB 3390 222222 DSN UNIT VOLUME ABE.FILE1 ABE.FILE2 USER CATALOG TST.PST TST.SEC 3390 VOLUME 111111 Volume Table of Contents

31 Copyright © 2005, Infosys Technologies Ltd 31 ER/CORP/CRS/OS01/003 Version No: 1.0 AB A.B A.C A.D A.C.EA.C.F A.D.G0000V00 A.D.G0001V00 Catalog Structure

32 Copyright © 2005, Infosys Technologies Ltd 32 ER/CORP/CRS/OS01/003 Version No: 1.0 Data set processing by MVS : Three distinct steps : –Allocation unit ( device ), volume, data set DISP parameter qualifies how a non-VSAM file is allocated –Processing Access methods used for processing –basic, queued or VSAM –open, I/O and close processing –Deallocation auto deallocate after job over

33 Copyright © 2005, Infosys Technologies Ltd 33 ER/CORP/CRS/OS01/003 Version No: 1.0 Storage Management subsystem : MVS/ESA feature, SMS is a separate software that automates storage management. SMS uses storage class, data class etc., to automate storage management Enables allocating VSAM data sets using JCL –Without SMS an AMS ( Access Method Service ) utility called IDCAMS needs to be used for this purpose.

34 Copyright © 2005, Infosys Technologies Ltd 34 ER/CORP/CRS/OS01/003 Version No: 1.0 Job Management

35 Copyright © 2005, Infosys Technologies Ltd 35 ER/CORP/CRS/OS01/003 Version No: 1.0 Job Management A job is the execution of one or more related programs in sequence –Each program to be executed is a job step Job control language or JCL : –A set of control statements that provide the specifications necessary to process a job.

36 Copyright © 2005, Infosys Technologies Ltd 36 ER/CORP/CRS/OS01/003 Version No: 1.0 The 3 Basic JCL statements JOB –Info that identifies a job EXEC –Name of program to be executed DD –Defines data, one per file of data referred

37 Copyright © 2005, Infosys Technologies Ltd 37 ER/CORP/CRS/OS01/003 Version No: 1.0 Basic format of a JCL //SYDOEJ JOB USER=SYSDOE,PASSWORD=xxxxx Identifier field Name field Operation field Parameters field

38 Copyright © 2005, Infosys Technologies Ltd 38 ER/CORP/CRS/OS01/003 Version No: 1.0 Job that prints a library member //SYDOEJ JOB USER=SYSDOE,PASSWORD=xxxxxxx // EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSN=SYDOE.COPYLIB.COBOL(OPENITEM), // DISP=SHR //SYSUT2 DD SYSOUT=A //SYSIN DD DUMMY ( Note JCL syntax for continuing a statement on the next line. )

39 Copyright © 2005, Infosys Technologies Ltd 39 ER/CORP/CRS/OS01/003 Version No: 1.0 JES - Basic responsibilities Enter job into system. Decide when job is be processed. Pass job to MVS for processing. Deliver job’s printed output to correct destination.

40 Copyright © 2005, Infosys Technologies Ltd 40 ER/CORP/CRS/OS01/003 Version No: 1.0 How is an MVS job processed ? (JES) 1.The job is submitted. 2.The job is selected for execution. 3.The job is executed. 4.The job’s output is processed. 5.The job is purged.

41 Copyright © 2005, Infosys Technologies Ltd 41 ER/CORP/CRS/OS01/003 Version No: 1.0 Submitting a job Create JCL at terminal using an editor (ISPF). –Job stream now in a file on DASD Use SUBMIT command to enter job into system : –JES copies job stream into JES spool ( a special system DASD file ).

42 Copyright © 2005, Infosys Technologies Ltd 42 ER/CORP/CRS/OS01/003 Version No: 1.0 Scheduling for execution … Each initiator has one or more job classes associated with it –Can control no. of jobs of each class and combinations there-of. Within a class initiators select a job for execution based on priority ( 0 - 15 ).

43 Copyright © 2005, Infosys Technologies Ltd 43 ER/CORP/CRS/OS01/003 Version No: 1.0 Scheduling for execution … Job class & priority decides when a job is actually scheduled to run. Initiator – prog. that runs in sys region of address space eligible for batch jobs –Examines JES spool, selects job, executes job in address space & returns to spool for next job. Each initiator handles one job and no. of initiators can be varied dynamically.

44 Copyright © 2005, Infosys Technologies Ltd 44 ER/CORP/CRS/OS01/003 Version No: 1.0 Scheduling for execution … A typical Job-class assignment :- Job ClassCharacteristics AWill execute within 15 mins of submission B 30 mins C 1 hour DWill execute overnight HWill be held until released by operator LWithin 15 mins of submission; each step limited to 1 min execution time Trequires tape processing

45 Copyright © 2005, Infosys Technologies Ltd 45 ER/CORP/CRS/OS01/003 Version No: 1.0 Scheduling for execution Typical initiator-class assignment : InitiatorEligible job classes 1A 2B,C,D,H,L,T 3B,C,D,H,L,T 4B,C 5B,C 6C

46 Copyright © 2005, Infosys Technologies Ltd 46 ER/CORP/CRS/OS01/003 Version No: 1.0 Executing a job … Initiator selects job for exec and invokes interpreter. Interpreter examines job stream and creates a series of control blocks which describe all data sets required. Then, initiator, –invokes allocation routines –builds user region and executes job in it –invokes unallocation routines after job over.

47 Copyright © 2005, Infosys Technologies Ltd 47 ER/CORP/CRS/OS01/003 Version No: 1.0 Executing a job

48 Copyright © 2005, Infosys Technologies Ltd 48 ER/CORP/CRS/OS01/003 Version No: 1.0 Processing a job’s output Like jobs, SYSOUT data is also assigned to different output classes : –Class A : Std printer output, Class Z : held output, etc., Single job may produce SYSOUT data using more than one output class : –Class A for system messages & program output, class D for some of job’s spooled output. Specs for output like no. of copies etc.,

49 Copyright © 2005, Infosys Technologies Ltd 49 ER/CORP/CRS/OS01/003 Version No: 1.0 Purging a Job JES spool space held by job freed, after output processing has been done. JES control blocks associated with job deleted.

50 Copyright © 2005, Infosys Technologies Ltd 50 ER/CORP/CRS/OS01/003 Version No: 1.0 Alternative data set allocations : Job-step allocation : –allocate/deallocate on a step by step basis. JES3 allocation : –part of resources pre-allocated by JES3 and rest by MVS during execution. –prevents resource conflicts Dynamic allocation : JES2 & JES3 –No allocation till request. –Mainly used during TSO sessions.

51 Copyright © 2005, Infosys Technologies Ltd 51 ER/CORP/CRS/OS01/003 Version No: 1.0 Summary Data Management –Definition of data set and Record Formats –Describe the organization of data sets –VSAM and Non-VSAM –Performance Tuning –Storage Management Subsystem Job Management –What is a “job” ? –How does JCL specify its processing requirements ? –Job Entry Subsystem - overall responsibility for job management. –Phases a job goes through as it is processed. –Sample output of messages & results.

52 Copyright © 2005, Infosys Technologies Ltd 52 ER/CORP/CRS/OS01/003 Version No: 1.0 Thank You!


Download ppt "MVS (Day 2). Copyright © 2005, Infosys Technologies Ltd 2 ER/CORP/CRS/OS01/003 Version No: 1.0 Agenda Data Management –Definition of data set and Record."

Similar presentations


Ads by Google