Вы находитесь на странице: 1из 20

Select Statement: - E.g.: select * from DSN8800.

dept
Start > Programs > IBM DB2 > DB2COPY1 (Default) > Command Line Tools > Command

1. 2.

Using single SELECT statement, you can select data from one column or as many as 750 columns. ORDER BY To retrieve rows in a specific order,

SELECT EMPNO, LASTNAME, HIREDATE FROM DSN8810.EMP WHERE WORKDEPT = A00 ORDER BY HIREDATE ASC;
3.

GROUP BY Use GROUP BY to group rows by the values of one or more columns or by the results of an
expression. You can then apply aggregate functions to each group. Except for the columns that are named in the GROUP BY clause, the SELECT statement must specify any other selected columns as an operand of one of the aggregate functions.

SELECT WORKDEPT, AVG(SALARY) AS AVG_SALARY FROM DSN8810.EMP GROUP BY WORKDEPT HAVING COUNT(*) > 1 ORDER BY WORKDEPT;

4.

HAVING Use HAVING to specify a search condition that each retrieved group must satisfy. The HAVING
clause acts like a WHERE clause for groups.

SELECT WORKDEPT, AVG(SALARY) AS AVG_SALARY FROM DSN8810.EMP GROUP BY WORKDEPT HAVING COUNT(*) > 1 ORDER BY WORKDEPT;

5. UNION Using the UNION keyword, you can combine two or more SELECT statements to form a single result
table. You can use UNION to eliminate duplicates when merging lists of values obtained from several tables. The following SQL statement gives a combined result table containing employee numbers in ascending order with no duplicates listed:

5. UNION ALL If you want to keep duplicates in the final result table of a UNION
SELECT EMPNO FROM DSN8810.EMP WHERE WORKDEPT = D11 UNION <<ALL>> SELECT EMPNO FROM DSN8810.EMPPROJECT WHERE PROJNO = MA2112 OR PROJNO = MA2113 OR PROJNO = AD3111 ORDER BY EMPNO;

5.

ROWID column A ROWID column is a column that is defined with a ROWID data type. ROWID columns can
be defined as GENERATED ALWAYS or GENERATED BY DEFAULT. GENERATED ALWAYS means that DB2 generates a value for the column, and you cannot insert data into that column. If the column is defined as GENERATED BY DEFAULT, you can insert a value, and DB2 provides a default value if you do not supply one.

6. Joins:- Inner Join, left outer join, full outer join, Right outer join Inner join: - SELECT PART, SUPPLIER, PARTS.PROD#, PRODUCT FROM PARTS INNER JOIN PRODUCTS ON
PARTS.PROD# = PRODUCTS.PROD#; 7.

Schema: - The objects in a relational database are organized into sets called schemas. A schema is a collection of named objects. The first part of a schema name is the qualifier. A schema provides a logical classification of objects in the database. The objects that a schema can contain include tables, indexes, table spaces, distinct types, functions, stored procedures, and triggers. An object is assigned to a schema when it is created

8.

What is a cursor in DB2? Answer: Most programming languages can only process one record at a time and so when you use a DB2 query where you expect multiple rows to be returned the results get stored in an intermediate buffer. The cursor is the pointer to the record in that buffer that you are currently up to in processing of the results returned from the query. e.g.; - Step

1 - declare the cursor

Declare CursorJamesCameron Cursor for Select Film_Title from Director_Film_Table Where Director_Last_Name equals "Cameron" and Director_First_Name equals "James" Order By Film_Title;
Note: That this example fetches only one column - Film_Title - but multiple columns can be fetched simultaneously.

Step 2 - open the cursor Open CursorJamesCameron; Step 3 - fetch the data into a host variable Fetch CursorJamesCameron Into: CameronMovieName;
Result after the first fetch Host variable : CameronMovieName will equal "Aliens" The fetch will take the current sequential row and put it into the host variable. It will then set the next sequential row to the current sequential row. The host variable must be able to accommodate the data that the cursor has defined. If more than one column is fetched each column must have a correlating host variable. You can repeat doing the fetch until you finish reading each row. When all rows are read the host variable will be set to null or spaces. Usually a special host variable is set by the dbms to indicate that the cursor is empty. In DB2 the SQLCODE is set to +100.

Step 4 - close the cursor Close CursorJamesCameron;


9. Triggers: - A trigger defines a set of actions executed in response to the event of an INSERT, UPDATE or DELETE operation on a specified table. When such an SQL operation is executed, the trigger is said to be activated. The trigger can be activated before the SQL operation or after it. You define a trigger using the SQL statement CREATE TRIGGER. You can use triggers that run before an update or insert in several ways: To check or modify values before they are actually updated or inserted in the database. This is useful if you need to transform data from the way the user sees it to some internal database format. To run other non-database operations coded in user-defined functions

CREATE TRIGGER NEW_HIRE AFTER INSERT ON EMPLOYEE FOR EACH ROW UPDATE COMPANY_STATS SET NBEMP = NBEMP + 1 10. What is JCL Job Control Language? The language used to describe the steps of a batch job (files to be used, programs to be run, etc). A generic term, hijacked by IBM to refer to the batch control languages for its System/360 operating systems. 11. What is CICS? CICS stands for Customer Information Control System. It is a general-purpose transaction processing subsystem for the z/OS operating system. CICS provides services for running an application online, by request, at the same time as many other users are submitting requests to run the same applications, using the same files and programs. CICS manages the sharing of resources, the integrity of data and prioritization of execution, with fast response. CICS authorizes users, allocates resources (real storage and cycles), and passes on database requests by the application to the appropriate database manager (such as DB2). We could say that CICS acts like, and performs many of the same functions as the z/OS operating system 12. What is VSAM? VSAM stands for Virtual Storage Access Method. The VSAM is a method used for managing files in mainframe system. Types of VSAM datasets: The datasets of VSAM are generally referred as clusters and there are four types of VSAM datasets based on the way the records are stored and accessed which are given below: EntrySequencedDataSet(ESDS)-firstcomefirstbasis KeySequencedDataSet(KSDS)keybasedorindexbased LinearDataSet(LDS)-bytestreamdataset Relative Record Data Set (RRDS) - record number or sequence number 13. SQL Return Codes: - SQLCA - The SQL communications area (SQLCA) structure is used within the DB2 program to return error information to the application program. This information in the SQLCA and the SQLCODE field is updated after every API call for the SQL statement The SQLCODE field contains the SQL return code. The code can be zero (0), negative or positive - 0 means successful execution. - Negative means unsuccessful execution with an error. An example is -911 which means a timeout has occurred with a rollback. - Positive means successful execution with a warning. An example is +100 which means no rows found. http://en.wikibooks.org/wiki/SQL_Return_Codes 14. STLC Life Cycle:Project Initiation>System Study>Test Plan>Test Case Design>Test Automation>Execute test cases>Report Defects>Regression Test>Bug Analysis>Summary Report. 15. BIMAS BIMAS is an application which is installed on the server machine and using personal communication (PCOM) we can access this BIMAS application with the use of their host address or port number. BIMAS covers the various functional areas like Customer information, Account information, Securities, Cash information etc.

BIMAS contains the various online transactions which are used for various projects.

Online transaction: it means continues user interaction with the transactions. Batch transaction: JCL (Job Control Language) - with this we can run the batch jobs (programs, tables, files to be executed) to upload parameters on tables. Here no user interaction will be performed we need to only submit the batch through submit command. When we submit the batch program will be executed and if it runs successfully it will create some logs based on the operations performed on batch. All the logs we can check under spool (under TSO>SDSF). Data Sets: There are two types of datasets PDS and ..!! PDS contains members in the directory. 16. z/OS, as an operating system, provides program management services that let you create, load, modify, list, read, and copy executable programs. Data management: Softcopy publications services: Security services: System management services: Network communication services: Applications enablement services: UNIX System Services: Distributed computing services: e-Business services: Print services: ISPF: Provides facilities for all aspects of host-based software development. TSO/E: Time Sharing Option/Extensions (TSO/E) provides an interactive terminal interface. As in prior releases of TSO/E, this element includes CLISTs and REXX, but does not include a REXX compiler. In z/OS.e, the number of concurrent TSO/E sessions is limited to eight SDSF: An exclusive optional feature. System Display and Search Facility (SDSF) provides you with information to monitor, manage, and control your z/OS or z/OS.e system. Network File System (NFS) Network File System is a distributed file system that enables users to access UNIX files and directories that are located on remote computers as if they were local TCP/IP Transmission Control Protocol/Internet Protocol (TCP/IP) is a set of protocols and applications that allow you to perform certain computer functions in a similar manner independent of the types of computers or networks being used. When you use TCP/IP, you are using a network of computers to communicate with other users, share data with each other, and share the processing resources of the computers connected to the TCP/IP network. System Modification Program Extended (SMP/E) System Modification Program Extended (SMP/E) is a software tool designed to manage the installation of software products on your z/OS system, and to track the modifications applied to those products.
CSI data sets

The CSI data sets contain all the information that SMP/E needs to track the distribution and target libraries. As an example, just as a card catalog contains a card for each book in a library, the CSI contains an entry for each element in its libraries. The CSI entries contain the element name, type, history, how the element was introduced into the system, and a pointer to the element in the distribution and target libraries. The CSI does not contain the element itself, but rather a description of the element that it represents. Time Sharing Option/Extended (TSO/E) Time Sharing Option/Extended (TSO/E) is a base element of the z/OS operating system that allows users to interactively work with the system. It looks like the UNIX Shell. In general, TSO/E makes it easier for people with all levels of experience to interact with the z/OS system. TSO/E has advantages for a wide range of computer users. TSO/E users include system programmers, application programmers, information center administrators, information center users, TSO/E administrators, and others who access applications that run under TSO/E. TSO/E environments:You can use TSO/E in any one of the following three environments: Line Mode TSO/E: This involves using TSO/E commands typed on a terminal, one line at a time. This is a quick and direct way to use TSO/E, and it was how programmers originally used to communicated interactively with the z/OS operating system.

ISPF/PDF: The Interactive System Productivity Facility (ISPF) and its Program Development Facility (ISPF/PDF) work together with TSO/E to provide panels with which users can interact. ISPF provides a dialog management service that displays panels and enables a user to navigate through the panels. ISPF/PDF is a dialog of ISPF that helps maintain libraries (z/OS libraries included) of information in TSO/E and allows a user to manage the library through facilities such as browse, edit, and utilities. Information Center facility: A set of panels that enable you to display services like mail and names directory, perform data analysis, and prepare documents such as reports, graphs, and charts.

CLIST language
The CLIST language is a high-level programming language that lets programmers issue lists of TSO/E commands and JCL statements in combination with logical, arithmetic, and string-handling functions provided by the language. The programs, called CLISTs, can simplify routine user tasks, invoke programs written in other languages, and perform complex programming functions by themselves. REXX EXECs REXX is a programming language that is extremely versatile. Aspects such as common programming structure, readability, and free format make it a useful language for beginners and general users. Furthermore, because the REXX language can be intermixed with commands to different host environments, it provides powerful functions and has extensive mathematical capabilities, so it is also suitable for more experienced computer professionals. The TSO/E implementation of the REXX language allows REXX execs to run in any MVS address space. You can write a REXX exec that includes TSO/E services and run it in a TSO/E address space, or you can write an application in REXX to run outside of a TSO/E address space. TSO/E commands and programs Programs contain instructions that perform tasks. Some common programming languages used under TSO/E are assembler, COBOL, FORTRAN, Pascal, PL/I, REXX, and CLIST. REXX and CLIST (Command List) are high-level interpretive programming languages that allow you to combine TSO/E commands with language statements. The following commands can be used to compile or assemble source statements written in the various languages: _ ASM command _ COBOL command _ FORT command _ PLI command

System Management Facility (SMF)


System management facility (SMF) records in SYS1.MANxx data sets, system and job-related information that your installation can use in: _ Billing users _ Reporting reliability _ Analyzing the configuration _ Scheduling jobs _ Summarizing direct access volume activity _ Evaluating data set activity _ Profiling system resource use _ Maintaining and auditing system security

SMF data collection


The data collection is executed by several specific routines spread all over z/OS and other products. This collection is done into system-related or job-related records.

Resource Measurement Facility (RMF)


Many different activities are required to keep your z/OS running smoothly, and to provide the best service on the basis of the available resources and workload requirements. The console operator, the service administrator, the system programmer, or the performance analyst does these tasks. RMF is the tool (online and batch reports) that helps each of these people do the job effectively, as far as the performance of the system is concerned. RMF gathers performance data using three monitors: _ Short-term data collection with Monitor III _ Snapshot monitoring with Monitor II _ Long-term data gathering with Monitor I

Requirements for z/OS installation


To be able to install and customize a z/OS operating system, a system programmer has to possess certain basic skills and functions. Figure 2-4 lists some of the areas about which a programmer needs to know; these areas are explained here.

TSO/E TSO/E refers to Time Sharing Option Extensions. TSO/E is an option of the z/OS Operating System that allows users to interactively share computer time and resources. TSO/E is an integral part of z/OS, and serves as a platform for other elements, such as BookManager READ, HCD, and ISPF/PDF. ISPF/PDF The Interactive System Productivity Facility (ISPF) and its Program Development Facility (ISPF/PDF) work under TSO/E to provide panels with which users can interact. ISPF provides the underlying dialog management service that displays panels, and enables a user to navigate through the panels. PDF is a dialog of ISPF that helps maintain libraries of information in TSO/E and allows a user to manage the library through facilities such as browse, edit, and utilities. JCL During the install phase of z/OS, many batch jobs are required to be submitted. The JCL for these jobs needs to be updated for your environment. Therefore, it is essential that a system programmer be very familiar with JCL and batch job submission from TSO/E and using ISPF.

Storage managers
In a z/OS system, storage is managed by the following z/OS components: >> Virtual Storage Manager (VSM): Virtual storage is managed by the Virtual Storage Manager (VSM). The main function of VSM is to control the use of virtual storage addresses by programs. Each installation can use virtual storage parameters (at data set Sys1.Parmlib) to specify how certain virtual storage areas are to be allocated to programs. These parameters have an impact on central storage use and overall system performance. >> Real Storage Manager (RSM): Controls the allocation of central storage frames to pages during system initialization, and during system execution. >> Auxiliary Storage Manager (ASM): Controls the use of page data sets and the implicit paging I/O operation. As a system programmer, you are responsible for the size and the performance of the page data sets. Subsystem definitions A subsystem is a service provider that performs one function or many functions, but does nothing until it is requested. Multiprogramming Multiprogramming means that many tasks can be in a system at the same time, with each task running programs in its own address space (or sometimes in the same address space). In a single processor system (like a city with only one car), only one of these tasks can be active at a time. However, the active Multiprocessing Multiprocessing is a logical expansion of multiprogramming. Multiprocessing refers to the execution of more than one task simultaneously on more than one processor (which is like a city with several cars). All processors operate under a single copy of the operating system and share the same memory.

z/OS facilities for system programmers


As a system programmer, you should be familiar with the basic tools used in your daily job. These tools and their uses are as follows: >> TSO/E and ISPF are used to: Install and customize z/OS and other products Communicate interactively with the operating system Define and maintain user definitions Create data sets and JCL, and submit jobs Communicate with other TSO/E users Develop and maintain programs in languages such as assembler, COBOL, FORTRAN, Pascal, C, C++, JAVA, PL/I, REXX, CLIST, and so on. Manipulate data >> JCL enables you to submit jobs and allocate resources. >> SDSF is used to: Monitor JOBs waiting for execution Output waiting to be printed System resources used by JOBs System resources available for utilization Control System resources like printers JOB priority and class JOB output priority and class

TSO Command Reference

http://nsit.uchicago.edu/csm/CompOp/Doc/ispf/ispf.shtml
The following is a list of all of the standard TSO commands and what they do. Most people run ISPF on top of TSO (which is started using the pdf command). To enter TSO commands after the ISPF interface is started, you need to either precede the desired command with tso (eg. 'tso asm') or go into ISPF option 6 and enter the TSO command there. If the ISPF interface is not started or has been shut down then TSO commands can be entered at the READY prompt. Language Processing Commands: asm calc cobol fort pli plic vsapl invoke assembler prompter and assembler f compiler. invoke itf:pl/1 processor for desk calculator mode. invoke cobol prompter and cobol compiler. invoke fortran prompter and fortran iv g1 compiler. invoke pli optimizing compiler invoke pli checkout compiler invoke vsapl interpreter for tso

Program Control Commands: call link loadgo run test load and execute the specified load module. invoke link prompter and linkage editor. load and execute program. compile, load, and execute program. test user program.

Data Management Commands: allocate convert copy delete edit format free list listalc listbc allocate a data set. sift itf/pl1 and fortran source. copy a data set. delete a data set. create, edit, and/or execute a data set. format and print a text data set. release a data set. display a data set. display active data sets. display messages from operator/user.

listcat listds merge protect rename

display user catalogued data sets. display data set attributes. combine data sets. password protect data sets. rename a data set.

System Control Commands: account operator Session Control: exec help logoff logon profile send terminal time when invoke command procedure. invoke help processor. end terminal session. start terminal session. define user characteristics. send message to operator/user. define terminal characteristics. log session usage time. conditionally execute next command. modify/add/delete user attributes. place terminal in operator mode.

Foreground Initiated Background Commands: cancel output status submit cancel background job. direct output medium for background job. list status of background job. submit background job.

Access Method Service Commands: alter cnvtcat define export import alter attributes in catalog entries. entries in an os catalog are converted to entries in an existing vs2 master or user catalog. define user catalogs,data spaces, clusters, page spaces, nonvsam datasets, alias names, and generation data groups. move a cluster or user catalog entry from the system in which the command is executed. move a cluster or user catalog entry into the system in which the command is executed.

print repro verify

list all or part of an indexed sequential, sequential, or vsam dataset. copy vsam clusters, catalogs, and nonvsam datasets. verify end of file.

TSO/E languages There are two languages available in the TSO/E environment: CLIST and REXX. CLIST is an interpretative language that helps you to work more efficiently with TSO/E. It is a command list language because the most basic CLISTs are lists of TSO/E commands. When invoked, it issues the TSO/E commands in sequence. The CLIST language includes the programming tools you need to write extensive, structured applications. CLISTs can perform a number of complex tasks, from displaying a series of full-screen panels to managing programs written in other languages. The REstructured eXtended eXecutor (REXX) language is a programming language that is extremely versatile. Aspects such as common programming structure, readability, and free format make it a good language for beginners and general users. Yet because the REXX language can be intermixed with commands to different host environments, provides powerful functions, and has extensive mathematical capabilities, it is also suitable for more experienced computer professionals. The TSO/E implementation of the REXX language allows REXX execs to run in any MVS address space. You can write a REXX exec that includes TSO/E services and run it in a TSO/E address space, or you can write an application in REXX to run outside of a TSO/E address space. CLIST and REXX can be used to customize and tailor your TSO/E environment specifically for the applications you want to use. Figure 4-12 shows a sample CLIST procedure and a REXX exec. Interactive System Productivity Facility (ISPF) The Interactive System Productivity Facility/Program Development Facility (ISPF/PDF) is a set of panels that help you manage libraries of information on the MVS system. The libraries are made up of units called data sets that can be stored and retrieved. You can have different kinds of information in data sets. Some examples are: _ Source code _ Data such as inventory records, personnel files, or a series of numbers to be processed _ Load modules ISPF can be used in many ways. Some examples are the following: _ Users can edit, browse and print data. _ Data processing administrators and system programmers can use ISPF to: Monitor and control program libraries Communicate with MVS through TSO commands, CLISTs, or REXX EXECs _ Programmers can use ISPF to develop a batch, interactive, or any other type of program and its documentation. _ Terminal users can invoke a wide range of utilities like search, compare, compilers, and so forth. _ Programmers can use ISPF services to develop dialogs. ISPF: Data set types supported A data set is a collection of logically related data; it can be a source program, a library of macros, or a file of data records used by a processing program. Data records are the basic unit of information used by a processing program. ISPF supports the following data set types for any ISPF options, such as Edit, Browse, and Delete:
>> Sequential >> Partitioned (PDS) and Partitioned Extended (PDSE)

For VSAM data sets, ISPF supports creation, obtaining data set information, and deletion. Browse and Update is supported by DITTO, an IBM licensed program installed under ISPF. ISPF does not support the following: _ Record format variable block spanned (VBS) data sets _ Direct Access (DA) data sets _ Tape data sets _ Generation data group (GDG) base data sets In a sequential data set, records are stored and retrieved in a sequential order.

A partitioned data set is like a collection of sequential data sets, called members, each one having a name. A directory index is used to locate members in the partitioned data set. The directory consists of 256-byte records, each one containing directory entries. There is one directory entry for each member. z/OS MVS JCL Users Guide
JES(Job Entry Subsystem) - JES2 and JES3 perform similar functions. That is, they read jobs into the system, convert

them to internal machine-readable form, select them for processing, process their output, and purge them from the system. Spool Display and Search Facility (SDSF) SDSF is a licensed program that helps authorized users efficiently monitor and control the operation of an MVS/JES2 system. With SDSF you can authorize your MVS/JES2 users to: _ Control job processing (hold, release, cancel, and purge jobs) _ Monitor jobs while they are being processed _ Display job output before deciding to print it _ Manage the system's workflow _ Control the order in which jobs are processed _ Determine the number of output jobs and the total number of records to be printed _ Control the order in which output is printed _ Control printers and initiators _ View the MVS* system log online and use commands to search for specific information in the log _ Dynamically change job data set output descriptors _ Issue JES2 and MVS commands that affect their jobs _ Print selected lines of the JES2 output data set _ Edit JCL direct from spool ISPF BASICS:- The Interactive System Productivity Facility, or ISPF, is a development tool set for the z/OS operating system. It has been used since 1975 to increase the productivity of the development of mainframe applications, because it provides an extensive set of programmer oriented facilities.

The Time Sharing Option/Extended, or TSO/E, is a base element of IBM's mainframe z/OS operating system. TSO/E allows you to communicate interactively with the MVS operating system by typing commands (one line at a time) on a computer terminal. ISPF can be seen as an extension to TSO/E. It is housed "under" TSO/E, and sometimes the acronym TSO/ISPF is used to describe the facility that these two closely associated subsystems provide. The services provided by ISPF complement those of the host TSO/E system to provide interactive processing. TSO/E is the command-line interface and ISPF is the menu interface to TSO/E commands. ISPF includes four major components:

Dialog Manager, or DM Program Development Facility, or PDF Software Configuration and Library Manager, or SCLM Client/Server, or C/S

The PDF provides services to assist the developer of applications and dialogs, including:

Data set and catalog utilities View, browse, and edit functions TSO command interfaces Data set search and compare functions Programming library access services that include adding, finding, and deleting members, and displaying member lists

Types of data sets In the z/OS environment, files are known as data sets. ISPF mainly supports two types of data sets, sequential and partitioned. JCL and program source code are maintained as files of 80-byte records. Every statement is a full 80 bytes long even if it is completely blank. This is for compatibility with older MVS systems from the era of 80-column punched cards. Data files can be of a different fixed length or variable length.

Sequential data sets In a sequential data set such as a log file, transaction file, or a list file (as shown here), records are stored in physical order. New records are appended to the end of the data set. The records in a sequential data set can be retrieved only in the same order they were written. To process a record somewhere within the file, the system must scan past all of the preceding records.

Partitioned data sets Every file processed by ISPF is stored either on a host as a sequential data set or a member of a partitioned data set, or as a workstation file. A partitioned data set (PDS) consists of a directory and one or more members. A PDS is also called a library. Each member is functionally the same as a sequential data set, and you can process an individual member of a partitioned data set as if it were a sequential data set. In addition, there are some operationssuch as print, delete, rename, and compressthat you can perform on the entire PDS as if it were a single file. Partitioned data set members Partitioned data sets are good for keeping like things together. For example, all of your panel definitions could be members of a partitioned data set. Another PDS could contain all the message definitions, and another could contain all the programs in your application. Each partitioned data set contains a directory and data area. The directory maintains housekeeping information about the members stored in the data area. It stores an index of member names and their locations.
Parts of the TSO data set name

Standard TSO data set naming calls for three qualifiers within the name of the data set:

High-level Qualifier - Name of the Project or User ID User Determined Qualifier - DEV, TEST, PROD Type of Data - PL/I, COBOL, MSGS, PNL

Qualifiers can be up to eight characters long. When you specify a data set name, you separate the qualifiers by periods. A data set name can be up to 44 characters long, including periods. An example of a data set name is shown here. TSO Data Set Name : MFM3984.PAYROLL.COBOL TSO Data Set Member : MFM3984.PAYROLL.COBOL (PAY1)

z/OS Basic Skills - ISPF data set basics


Summary In this module, ISPF Data Set Basics, :

z/OS lets you maintain two types of data sets under TSO: sequential and partitioned. In a sequential data set, the records of a file can be retrieved only in the same order they were written. A partitioned data set (PDS) consists of a directory and one or more members. A PDS is also called a library. The parts of the data set name are separated by periods and include the project, group, and type. The PDS member name is included in parentheses after the data set name.

Commands: Using the LOCATE command with line numbers

You can position the display to a certain line number by using the LOCATE command, followed by the line number. Remember that this line number refers to the line number as it appears on the side of the display window. For example, Command ===> LOCATE 4500 brings line 4500 to the top of the display.

Using the FIND command

You can use the FIND command to search for a specific string of characters. You type FIND at the command line followed by the string. If the search string contains blanks or characters, enclose it in either single or double quotes. For example: Command ===> FIND FILESYSTYPE TYPE(UDS)" will find the next line that contains the target string. To search for additional occurrences of the same

string, press F5, the Repeat Find (Rfind) key.

JCL QUESTIONS

1. What is primary allocation for a dataset? The space allocated when the dataset is first created. 2. What is the difference between primary and secondary allocations for a dataset? Secondary allocation is done when more space is required than what has already been allocated. 3. How many extents are possible for a sequential file ? For a VSAM file ? 16 extents on a volume for a sequential file and 123 for a VSAM file. 4. What does a disposition of (NEW,CATLG,DELETE) mean? That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to delete the dataset if the step abends. 5. What does a disposition of (NEW,CATLG,KEEP) mean? That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to KEEP but not CATLG the dataset if the step abends. Thus if the step abends, the dataset would not be catalogued and we would need to supply the vol. ser the next time we refer to it. 6. How do you access a file that had a disposition of KEEP?

Need to supply volume serial no. VOL=SER=xxxx. 7. What does a disposition of (MOD, DELETE, DELETE) mean? The MOD will cause the dataset to be created (if it does not exist), and then the two DELETEs will cause the dataset to be deleted whether the step abends or not. This disposition is used to clear out a dataset at the beginning of a job. 8. What is the DD statement for a output file? Unless allocated earlier, will have the full parameters: DISP= (NEW,CATLG,DELETE), UNIT, SPACE & DCB . 9. What do you do if you do not want to keep all the space allocated to a dataset? Specify the parameter RLSE ( release ) in the SPACE e.g. SPACE=(CYL,(50,50),RLSE) 10. What is DISP=(NEW,PASS,DELETE)? This is a new file and create it, if the step terminates normally, pass it to the subsequent steps and if step abends, delete it. This dataset will not exist beyond the JCL. 11. How do you create a temporary dataset? Where will you use them? Temporary datasets can be created either by not specifying any DSNAME or by specifying the temporary file indicator as in DSN=&&TEMP. We use them to carry the output of one step to another step in the same job. The dataset will not be retained once the job completes. 12. How do you restart a proc from a particular step? In job card, specify RESTART=procstep.stepname where procstep = name of the jcl step that invoked the proc and stepname = name of the proc step where you want execution to start 13. How do you skip a particular step in a proc/JOB? Can use either condition codes or use the jcl control statement IF (only in ESA JCL) 13a. A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code? Provide the override on the EXEC stmt in the JCL as follows: //STEP001 EXEC procname,COND.stepname=value All parameters on an EXEC stmt in the proc such as COND, PARM have to be overridden like this. 14. How do you override a specific DDNAME/SYSIN in PROC from a JCL?

//<stepname.dd> DSN=... 15. What is NOTCAT 2 ? This is an MVS message indicating that a duplicate catalog entry exists. E.g., if you already have a dataset with dsn = xxxx.yyyy and u try to create one with disp new,catlg, you would get this error. the program open and write would go through and at the end of the step the system would try to put it in the system catalog. at this point since an entry already exists the catlg would fail and give this message. you can fix the problem by deleting/uncataloging the first data set and going to the volume where the new dataset exists(this info is in the msglog of the job) and cataloging it. 16. What is 'S0C7' abend? Caused by invalid data in a numeric field. 17. What is a S0C4 error ? Storage violation error - can be due to various reasons. e.g.: READING a file that is not open, invalid address referenced due to subscript error. 18. What are SD37, SB37, SE37 abends? All indicate dataset out of space. SD37 - no secondary allocation was specified. SB37 - end of vol. and no further volumes specified. SE37 - Max. of 16 extents already allocated. 19. What is S322 abend ? Indicates a time out abend. Your program has taken more CPU time than the default limit for the job class. Could indicate an infinite loop. 20. Why do you want to specify the REGION parameter in a JCL step? To override the REGION defined at the JOB card level. REGION specifies the max region size. REGION=0K or 0M or omitting REGION means no limit will be applied. 21. What does the TIME parameter signify ? What does TIME=1440 mean ? TIME parameter can be used to overcome S322 abends for programs that genuinely need more CPU time. TIME=1440 means no CPU time limit is to be applied to this step. 22. What is COND=EVEN ? Means execute this step even if any of the previous steps, terminated abnormally. 23. What is COND=ONLY ? Means execute this step only if any of the previous steps, terminated abnormally. 24. How do you check the syntax of a JCL without running it? TYPERUN=SCAN on the JOB card or use JSCAN.

25. What does IEBGENER do? Used to copy one QSAM file to another. Source dataset should be described using SYSUT1 ddname. Destination dataset should be decribed using SYSUT2. IEBGENR can also do some reformatting of data by supplying control cards via SYSIN. 26. How do you send the output of a COBOL program to a member of a PDS? Code the DSN as pds(member) with a DISP of SHR. The disp applies to the pds and not to a specific member. 27. I have multiple jobs ( JCLs with several JOB cards ) in a member. What happens if I submit it? Multiple jobs are submitted (as many jobs as the number of JOB cards). 28. I have a COBOL program that ACCEPTs some input data. How do you code the JCL statment for this? ( How do you code instream data in a JCL? ) //SYSIN DD* input data input data /* 29. Can you code instream data in a PROC ? No. 30. How do you overcome this limitation ? One way is to code SYSIN DD DUMMY in the PROC, and then override this from the JCL with instream data. 31. How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program? To run a non DB2 program, //STEP001 EXEC PGM=MYPROG To run a DB2 program, //STEP001 EXEC PGM=IKJEFT01 //SYSTSIN DD * DSN SYSTEM(....) RUN PROGRAM(MYPROG) PLAN(.....) LIB(....) PARMS(...)

/* 32. What is STEPLIB, JOBLIB? What is it used for? Specifies that the private library (or libraries) specified should be searched before the default system libraries in order to locate a program to be executed. STEPLIB applies only to the particular step, JOBLIB to all steps in the job. 33. What is order of searching of the libraries in a JCL? First any private libraries as specified in the STEPLIB or JOBLIB, then the system libraries such as SYS1.LINKLIB. The system libraries are specified in the linklist. 34. What happens if both JOBLIB & STEPLIB is specified ? JOBLIB is ignored. 35. When you specify mutiple datasets in a JOBLIB or STEPLIB, what factor determines the order? The library with the largest block size should be the first one. 36. How to change default proclib ? //ABCD JCLLIB ORDER=(ME.MYPROCLIB,SYS1.PROCLIB) 37. The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ? Records will be written to end of file (append) when a WRITE is done in both cases. 38. What are the valid DSORG values ? PS - QSAM, PO - Partitioned, IS - ISAM

39. What are the differences between JES2 & JES3 ? JES3 allocates datasets for all the steps before the job is scheduled. In JES2, allocation of datasets required by a step are done only just before the step executes.

Stubs- Stubs are used to substitute for the missing components. It is a small self-contained program that may do no
more than display its own name and then return.

Drivers-, models
Stubs Replacements for missing components that the components being tested will call as part of the test While doing an Integration , If we dont have all the modules get ready and Need to test a particualr module which is ready then We Use Stubs and Drivers. Stubs and drivers used in Integration testing for a Top Down Integration testing and Botton Up Integration Testing. For EX : If we have Modules x,y,z . X module is ready and Need to Test it , But i calls functions from y and z.(Which is not ready)To test at a particular module we write a Small Dummy piece a code which Simulates Y and Z Which will return values for X, These piece of Dummy code is Called Stubs in a Top Down Integration So Stubs are called Functions in Top Down Integration. Similar to the above ex: If we have Y and Z modules get ready and x module is not ready, and we need to test y and z modules Which return values from X, So to get the values from X We write a Small Pice of Dummy code for x which returns values for Y and Z,So these piece of code is called Drivers in Botton Up Integration So Drivers are calling Functions in Bottom Up Inegration.

Job Description: As an ISQA Analyst you will be responsible for executing quality testing practices in support of Chase Card Services applications under the direction of an onsite and remote U.S.-based ISQA Leadership. You will be involved with the plan, design and execution of the testing strategies and practices in order to meet the functional testing requirements for the applications being tested. In this fastpaced, dynamic environment, you will have the opportunity to interact with all project stakeholders throughout the SDLC. This position requires experience working in a 3-tiered architecture in support of web-based, client-server, and batch testing technologies. Essential Duties and Responsibilities: * Create test scripts using detailed business requirements, functional documents, and processes. * Interface with different resources in the workspace including development, business and analyst teams. * Execute test scripts, document actual results and create defects. * Hands-on experience and understanding of automated test script development and execution. * Recommend creative and proactive solutions to problem solving; displaying ingenuity as needed. * Support the test defect management process including monitoring and reporting on defect resolution. * Identify and recommend changes to established practices and policies. * Create, and maintain QA procedure documents. * Create, review and provide input into test cases.

* Coordinate the execution of test scripts with Test Leads, Project Managers, Development Managers, and internal testers. * Assess and revise test sequence and scope based upon test results and/or changes in product design. * Assist Application Developers and technical support staff in identifying and resolving defects. Required Skills: * Requires technical and operational knowledge within the QA area of responsibility. * Hands-on experience related to implementation of test strategies and tools. * Solid understanding of the Software Development Life Cycle, the role of ISQA within the SDLC and the ISQA process and testing methodologies. * Strong working knowledge of Quality Center, MS Office, SQL. * Strong Project Co-ordination and Project tracking skills. * Must have excellent verbal and written skills being able to communicate effectively on both a technical and business level. * Ability to work under pressure and multi-task. * Excellent attention to detail and ability to analyze detailed business requirements, raise questions and seek resolution to outstanding clarifications required for test case identification. * Strong work ethic. * A technical 4-year degree in computer science, computer information systems, engineering or equivalent is recommended but can be substituted for substantial test engineering experience. * Attention to detail and commitment to follow-through on issues. * Must demonstrate strong time management skills, ability to multi-task & handle multiple test assignments & prioritize one's own work. * Experience writing, modifying and executing PL/SQL queries. * Experience in testing large scale applications on the Mainframe platform

Preferred Skills: * Experience working in the Credit Card or Financial Services industry. * Data Conversion experience. * Knowledge of TSYS Mainframe Application. * Experience working across lines of business in remote locations. * Previous experience with test automation design and implementation. * Hands on experience with automated test tools such as Quick Test Pro and SoapUI

Вам также может понравиться