Need a ONLINE MAINFREAME Course/Poject Case Study) / Corporate Training/ application support ????

Lets schedule the class. Write me @ mfdtech@gmail.com, for more information refer to : http://onlinemainframe.blogspot.com/
Iam Willing to take up Freelancing projects on Cobol / MF. please mail me @ mfdtech@gmail.com

Google
 

Thursday, January 31, 2008

Interview Questions @ EMphasis

Cobol,Jcl,Db2 related Interview Qns

  1. How to identify a file declared in Source (cobal pmg only) is a VSAM file (ESDS.) or not.

    1. AS(Address Sequential ) as to prefixed to the logical name

      1. Eg :: select File1 assign to AS-FILE11

    2. Check the FD section :: we declare ORGANISATION IS SEQUENTIAL/INDEXED/ RANDOM

    3. File status code (23 eof)

  1. How do create VSAM files

    1. Using IDCAMS / File Aid / Workbench (these tools internally uses idcams)

  1. How do u identify a file to be created is ESDS/KSDS/RRDS – by looking at Cluster create statements .

    1. ESDS will have :: Data and Cluster Datasets

    2. KSDS will have :: Index,Data and Cluster Datasets

    3. RSDS will have :: Data and Cluster Datasets

Other Important Point is in Cluster Declaration, we declare Index, Non-Indexed

and Numbered for KSDS/ESDS/RRDS


  1. How do u identify whether VSAM file is Fixed or VB.

    1. If Record Size (F,F) -- > fixed, if Recordsixe (F,V) -- > Variable


  1. How do you identify the dataset is VSAM dataset or not by looking at the Job.

    1. Check the DCB parameter, for DSORG parameter

DSORG = PS (seq.dataset)

PO ( Partitioned dataset)

ESDS (esds vsame dataset)

KSDS (ksds vsame dataset)

RRDS (rrds vsame dataset)


  1. How do u copy records from 50 to 70 from a file having 100 records (for various vsam files).

    1. Use Repro with ESDS :: From (address) To (address)

    2. KSDS :: From (Index key) To (Index Key)

    3. RRDS :: From (Number) To (Number)

    4. LSDS :: Skip (nn), count(nn)


  1. How do u declare a Variable file in Cobol -- check roy and datidar

    1. Eg :: FD File1

Record Contains 10 to 1000 characters

        1. WS-Rec-MIN PIC X(10).

        2. 01 WS-Rec-Max PIC X(1000)


  1. how do u declare LRECL in JCL for Variable file.

    1. For above file lrcel = 1004 (i.e., 4 bytes additional to actual size of file)


  1. When do use Optional file – while declaring a file and where do u mention this.

    1. We use this in IO-section,

    2. The job will run even when the file is available or not.

Eg : :: select File1 assign to AS-FILE11

File1 is Optional


  1. When do we use Extend Mode for the seq file,

    1. This mobe is used to append the data. Usually it is used to record history.


  1. Can cobol pgm can be coded without FD section ?

    1. Yes.

    2. Eg : Usually most of the subprograms or stored procedures will not have FD section


  1. D in 7th column of cobol program

    1. This is used in the program for debugging mode


  1. SOC4 :: trying to read a will which is not opened or index/subscript out of range (it basically happens while trying to access the data)


  1. SOC7 :: Dataismatch (will give the statement of the process statement. (like IF ws-n > 0) or airthamatic statements or statemts involves evaluation etc.,) Note :: Move statement is root cause for SOC7 error Resolution :: a) get the error statemnt no. from the sysout of run-jcl b) search for the statement no. in sysprint of Compile jcl log -- this will give you the approxmate statement caused soc7 error, c) Find for the variable with comp3 in above statement, and find the cause using by displaying respective variables or using Expdeter


  1. Pls write the jcl to run main program which has a subroutine?

Main Pgm::

Select INFILE-MAIN assign to MAINFL


SUB Pgm ::

Select INFILE-SUB assign to SUBFL


JCL ::


//job

//step exec PGM=MAINPGM

//MAINFL DD DSN=a.b.main

//SUBFL DD DSN = a.b.subp



  1. What is implicit and Explicit Commit

    1. Explicit commit is coded by the programmer, as and when specified commit point is reached data is commited, this is done to minimize the data loss in case of abends.

    2. Implicit Commit is taken care by the system on successful/unsuccessful execution.


  1. I have 200 versions of a GDG, how to include all the versions in a single step.

    1. Use the GDG base, It will include all the versions (including the one created in above step)


  1. In step1 I have created a version with +1, how do crete 2nd version in next step

    1. Give it at (+2)


  1. Now I want to use the file created in step to in step 3, how do u refer that

    1. Give it as (+2) as we are in same Job


  1. How to Pass return Code / data to JCL from COBOL

    1. We can pass only two bytes of data from cobol to JCL using the RETURN-CODE.

    2. Eg : Move 04 to RETURN-CODE. This return code will override the actual return code of previous step.

  1. which file is required, to expedit(debug a program thru expeditor) a program

    1. Its DDIO (RRDS ) file (to generate this file pgm has to be compiled with Exped=y option)

Tuesday, January 29, 2008

Mainframe Written test @ Accenture

1. What r the 2 function we can get by using INSPECT verb? (c)

A. file handling, error handling

B. opening a file, closing a file.

C. char counting, replacing.

D. none of the above


2. Indicate which of the following is not true about the formal parameters in a subroutine?(c)

A. every formal parameter must appear in the linkage section of the subroutine

B. every formal parameter must appear in the using phrase of the procedure division header of the subroutine

C. A formal parameter name can appear more than once in the using phrases of the procedure division header of the subroutine.

D. A formal parameter can not be declared with value clause in a subroutine


3. What is the value of A? (B)

01 A pic 9(3).

Move 100 to A.

Perform 1000-para thru 1000-exit.

Display the value of a=A

Stop run.

1000-para.

If A=100

Perform 1000-exit

Else

Move 150 to A

End-if.

Move 200 to A.

1000-exit.

Exit.

a.100

b.200

c.150

d. none of the above is correct.


4. What is the value of B? (A)

Move 1 to A

Evaluate true

When A>0

Move 20 to B

When A=1

Move 10 to B

When A<1

Move 30 to B

End - evaluate.

A. 20

B. 10

C. 30

D. none of the above is correct


5. In file handling what is the meaning of access mode DYNAMIC? (B)

a. Data can b accessed only sequence

b. Data can b accessed both sequence and rand

c. Data can b accessed only rand

d. This is not correct access method


6. Which of the following is not true about the block contains clause? (C)

a. It reduces the space required to store a file on tape or disk

b. It reduces the time required to process a sequence file

c. It reduces the number of logical records in a file

d. It reduces the number of physical records in a file


7. All the following statements are false about the merge verb except one. Identify this

a. Can merge a max of 3 files? (C)

b. Does not require that the i/p files to b merged b sorted on the merge keys.

c. Requires that all files mentioned in the statement must have records of same size

d. Does not require that the positions of the merge key with in the record descriptions of each of the files must b same.


8. to prevent DB2 from closing a cursor after a commit operation, which of the following DECLARES CURSOR statements is used? (B)

A. for update

B. with hold

C. where current of

D. with commit of

E. none of the above is correct


9.Wcich of the following delete rules will not allow a row to b deleted from the parent table if a row with corresponding key value still exists in the child table?(C)

A. delete

B. cascade

C. restrict

D. set null

E. all of the above is correct


10. Physically the DB2 data is stored in which data sets?(C)

A. sequential datastes

B. hierarchical

C.VSAM

D. partitioned


11. How would you determine you are at the end of the result set? (C)

A. check the NULL indicator host variable after each fetch

B. check the SQLCA after closing the cursor

C. check the SQLCA after each fetch

D. checks the SQLDA after each fetch.


12. An update lock gets released by an application using the repeatable read isolation level during which of the following? (D)

a. If the cursor accessing the row is closed.

b. If the transaction issues a ROLLBACK statement.

c. If the cursor accessing the row is moved to the next row.

d. If the transaction changes are made via an UPDATE statement.


13. Which of the following options can b used to place the cursor on the screen thru the program? (C)

A. By setting IC position in the map set.

b. Moving -1 to field attribute

c. Moving -1 to field length

D. none of above


14. Which one of the following can b used to register a TDQ? (C)

a.PPT

b.PCT

c.DCT

d.FCT


15. Find out the correct option from the following? (C)

1. Physical map is a load module

2. Symbolic map is a load module

3. Physical map is a program name

4. Symbolic map is a map copybook

a.1&2

b.2&3

c.1&4

d.all of the above


16. How can a transaction b initiated from the program? (B)

A. by giving program name

B. by using START command in the program

C. by using LINK

D. by using CALL


17. Which one of the following is related to MDT?(D)

A. fset & feset

B. reset & frset

C. reset & modify

D. fset &frset


18. Which will override in steplib & joblib : StepLib


19. what will be the COND parameter for executing a step, even if any of the previous steps terminated abnormally?

Cond=even


20. which of the following options is true, for getting xclusive control of the dataset?

Disp=old


21. Select the wrong choice? (D)

A. IDCAMS is utility of access method services, used to define VSAM clusters

B. REPRO is used to copy records from VSAM file to non-VSAM file and vice versa

C.LISTCAT utility is used to use to find the details like NAME, HISTORY, VOLUME, and ALLOCATION of the any existing VSAM dataset.

D. records of VSAM files generally stored in blocks not in control intervals


22. for which of the following file type, will the control interval split occur? (A)

A. ksds

B. esds

C. rrds

D. All of the above.


23. Select the correct answer? (D)

A. records from KSDS can b deleted physically

B. records from ESDS can not b deleted physically

C. RRDS does not support spanned records.

D. all of the above is correct


24. When do we encounter the status code ‘GA’ for IMS database? (B)

A. At the end f the database.

B. The next higher level segment was retrieved during sequential retrieval.

C. A segment of different type has been retrieved.

D. The segment field has been changed in the program’s IO area.


25. Which of the following is true? (A)

A. A qualified call should have an SSA and an unqualified call doesn’t have any SSA

B. A qualified call should not have an SSA and an unqualified call should have an SSA

C. A qualified call and an unqualified call both should have an SSA.

D. none



For Technical Interview Questions : keep watching this blog.

Sunday, January 27, 2008

IKJEFT01 – Terminal Monitor Program (TMP)


IKJEFT01 – Terminal Monitor Program (TMP)


We can Invoke DB2 subsystem in three ways

1. SPUFI

2. QMF and

3. IKJEFT01 --- Here we discuss more about this TMP.

IKJEFT1A and IKJEFT1B are not utilities but are rather two alternate entry points for the TSO Terminal Monitor Program initialization routine, IKJEFT01. The DB2 utilities were written to run under TSO, either under a terminal session or in batch.

If you have access to the JCL used to start your TSO sessions, you will see that on the // EXEC statement, PGM=IKJEFT01 most likely (or, in some cases, ADFMDF03, which is a part of TSO/E called the Session Manager which, at shops enlightened enough to run it, calls IKJEFT01 in turn). When running the TMP in batch, in order to have TSO execute a series of TSO commands asynchronously, you can use PGM=IKJEFT01, IKJEFT1A or IKJEFT1B.

The following is taken from the TSO/E User's Guide for z/OS 1.4, section 3.4.4.1.2:

“PGM= “ specifies the module being executed. In addition to IKJEFT01, there are two other entry points available for background execution that provide additional return code and abend support. The differences among the three entry points are:

PGM=IKJEFT01 ::

  • When a command completes with a non-zero return code, the program goes to the next command. When a command abends, the step ends with a condition code of 12 (X'C').


PGM=IKJEFT1A ::

  • If a command or program being processed by IKJEFT1A ends with a system abend, IKJEFT1A causes the job step to terminate with a X'04C' system completion code.

  • IKJEFT1A also returns to the caller the completion code from the command or program in register 15.

  • If a command or program being processed by IKJEFT1A ends with a user abend, IKJEFT1A saves the completion code in register 15 and then terminates.

  • If a command, program or REXX exec being processed by IKJEFT1A returns a non-zero return code to IKJEFT1A, IKJEFT1A saves this return code in register 15 and then terminates.

  • Non-zero return codes to IKJEFT1A from CLISTs will not affect the contents of register 15 and the TMP will continue processing.

  • For a non-zero return code or an abend from a command or program that was not given control directly by IKJEFT1A, no return code is saved in register 15, and IKJEFT1A does not terminate.

For more info refer to :: http://www.teradataforum.com/l030315a.htm

DB2 - CHECKPOINTING & RESTART

CHECKPOINTING & RESTART IN BATCH PROGRAMS IN CASE OF ABENDS


The Concept of Check pointing is to Save the data permanently in the database till the Last Checkpoint in case of an Abend in the Program after taking a Checkpoint. In the case of an abend the DBA will automatically back out (reverse) the changes made to the Database after the Checkpoint. So if we RESTART the Program after an abend, the program will use the Last Check pointing Information for restarting. There are various ways for Checkpoint/Restart.


1. With the Help of a Restart File: -


This type of Check pointing will need a Restart File. In this type, while taking each Checkpoint we will store the Checkpoint ID, with the Necessary Save Area in CC5DAP database. The Checkpoint ID will be usually the Time at which that particular Checkpoint was taken. For Restarting this type of Programs, there will be two Steps.


The first step will put the Stored CC5DAP data corresponding to the Last Checkpoint to a Restart File.

The Second Step will read this Restart File, correctly gets positioned in the Database where the Last Checkpoint was taken (for e.g.:- if it is a Sequential execution in a database), and starts Execution from that point.


2. With the Help of a BMP(Batch Message Processing) Record:-

This is the Latest Technique being used for taking Checkpoint. In this case NO Restart File or CC5 Database is required for Restarting the Program in case of an abend. It uses a BMP Record to get back all the information about the last Checkpoint.


Here the Checkpoint Id will be 8 characters (4 character Program Identification ID + Sequence Id).


For e.g.: - if your Program is BMD001CP, you can put the Program Identification ID as 'BMD1'. The

Sequence Id contains the number of the Last Checkpoint.

(e.g.:- if it is the 19th Checkpoint, Sequence ID will be 0019).


During Restart of the Program, it will automatically read the corresponding BMP Record and gets all stored information regarding the Last Checkpoint.


Saturday, January 26, 2008

Oracle 11i Applications Architecture




The Oracle Applications Architecture is a framework for multi-tiered, distributed computing that supports Oracle Applications products. In this model, various servers are distributed among multiple levels, or tiers.


Oracle Applications Architecture


The Desktop Tier


The client interface is provided through HTML for the newer HTML-based applications, and via a Java applet in a Web browser for the traditional Forms-based interface.


Forms-based Desktop Tier Architecture


In Oracle Applications Release 11i, each user logs in to Oracle Applications through the E-Business Suite Home Page on a desktop client web browser.


Forms Client Applet


The Forms client applet is a general-purpose presentation applet that supports all Oracle Applications Forms-based products, including those with customizations and extensions. The Forms client applet is packaged as a collection of Java Archive (JAR) files. The JAR files contain all Java classes required to run the presentation layer of Oracle Applications forms.


Oracle Jinitiator


The Forms client applet must run within a Java Virtual Machine (JVM) on the desktop client. The Oracle JInitiator component allows use of the Oracle JVM on web clients instead of the browser’s own JVM. JInitiator is implemented as a plug-in (Netscape) or ActiveX component (Microsoft Internet Explorer).


The Forms client applet and commonly used JAR files are downloaded from the Web server at the beginning of the client’s first session. Less commonly used JAR files are downloaded as needed.


The Application Tier


The Application tier has a dual role: hosting the various servers that process the business logic, and managing communication between the desktop tier and the database tier. This tier is sometimes referred to as the middle tier. Oracle9i Application Server (9iAS) provides the technology used on the application tier. Six servers comprise the application tier for Oracle Applications:


Web server

Forms server

Reports server

Discoverer server (optional)

Concurrent Processing server

Admin server


Try to avoid using a mixture of different platforms on your application tier. This makes maintenance easier, since only one set of patches needs to be downloaded.


Load Balancing


The application tier supports load balancing among many of its servers to provide higher availability, fault tolerance, reliability, and optimal scalability. If you have more than one of any of the following types of server, load balancing can be employed:


Web server

Forms server

Reports server

Discoverer server

Concurrent Processing server


Typically, load balancing is most commonly used to spread the load across multiple Web servers, where the load may vary significantly.

For More Information : Keep watching this blog

Powered by : Oracle Documentation



Thursday, January 24, 2008



Tips for Telephone interview:


Telephone contact means that there are no visual clues unlike a face-to-face interview, In a telephone interview you have to sell yourself using only words and the tone of your voice


Smile! Amazing as it might sound, smiling whilst you talk really helps. You will come across as more friendly and confident. Try it!



Few Minutes Before Telephonic:

Should have compile list of :

• Your strengths and weaknesses
• Your background and skills,

• Answers to typical interview questions

Make sure you have :

• Keep your resume in clear view, so it's at your fingertips when you need to answer questions.

• Have a pen and paper handy for note taking.

• Turn mobile phones off, so your call isn't interrupted

• Practice reducing "ums" and "uhs" and "okays"



During the Interview:

• The first 15 seconds are crucial and interest in your voice is the key. Just the way you answer the phone has an impact on the caller. Talk distinctly and with confidence.

• Smile! Smiling whilst you talk really helps. You will come across as more friendly and confident.

• Use gestures as in normal conversation and be enthusiastic where appropriate

• The tone and rhythm of your voice are important. If you speak in a monotone this will be more apparent on the telephone.

• The interviewer may start with the question, "Tell me about yourself." You should be able to explain the value you added to the company.

• Review a problem that you turned into a positive situation for each position that you list. If possible try to quantify accomplishment in each position

• Give short answer to questions. Short sentences are more easily understood over the phone than long orations. They also give more opportunity for interchange between you and the interviewer, which helps both of you maintain your interest

Listen to Interviewer carefully :


• When the interviewer speaks give him your undivided attention

• Don’t look at your notes or think of anything else during that time

• Don't answer a question that you haven't fully understood.

Restate the question.

• This will also give you time to prepare an answer and prevent long silences on the phone.

• Don't do this too often, as the interviewer will quickly become tired of repeating himself or herself.

Answer questions courteously.


• Try to sound relaxed and confident.

• A note of irritation or frustration in your voice is much more noticeable over the phone, and can't be offset by positive body language.

• Try not to be put off by pauses from the interviewer - (s)he may be taking notes .Don’t feel compelled to fill in pauses with some comments or questions.


Strengths and Weaknesses.

• You must be able to specify your major strengths.

• Your weaknesses, if such must come up, should only be turned around to positives.

Donts :

• Rambling,

• Interrupting the interviewer



Winding up…


• The end of the call is always a tricky thing. A good suggestion is to thank the caller for his or her time.

• If you don't already have it, be sure to ask for the interviewer's exact title and name spelling, along with a email address, so that you can send a thank you note.


Best of Luck • • •








Wednesday, January 23, 2008

DB2 Utilities and Commands (helpful for DB2 Certification)

• Utilities
– Image Copy
– CDB SuperCopy
– Quiesce
– Load
– CDB SuperLoad
– Check
– BSCTIAUL
– CDB SuperUnload
– Recover
– CDB SuperRestore
– Reorg
– CDB SuperReorg
– Runstats
– Report Recovery
– Repair

• Commands
– Display/Stop/Start Database
– Display/Term Utility


DB2 Logging

• DB2 Logs
– A ‘journal’ of all activity for a subsystem
– Undo/redo records for table updates
– Each event in the log is identified by its RBA(relative byte address)
– RBA denotes a point in time: the greater the RBA, the later in time the event occurred

– Data Sharing - LRSNs along with RBAs

– Some events:
• Full image copy
• Quiesce
• Load


Data Sharing

• Benefits of Data Sharing
– High availability
– Workload balancing
– Sysplex parallelism
– Better use of resources


Backing Up Tables

• Image Copy
– Backup for DB2 table spaces
– Can also copy index spaces
– Can perform full (all data) or incremental (changed data) copies
– Can prevent or allow updates by others during copy
– SAMPLIB: DB2COPY

• CDB SuperCopy
– Faster method of creating standard DB2 image copies
– Can back up several spaces with single command, via generic name
– Can stack multiple copies on one tape
– Supports dynamic allocation of image copy tape files
– SAMPLIB: CDBCOPY

The Quiesce Utility

• Quiesce
– Sets a ‘bookmark’ in the DB2 log,indicating the RBA at which NO activity is occurring on the specified table space(s)
– Use this utility to produce an RBA that can later be used for a point-intime (PIT) recovery of the table space(s)
– Several spaces can be quiesced in a single request
– Runs very quickly
– Use this in production wherever you want to establish a possible recovery point
– SAMPLIB: DB2QUIES

Loading Tables

• Load
– Loads data into DB2 table from an external QSAM file (tape or disk)
– Can selectively include or exclude input records
– Can replace all rows, or add to existing rows
– Can enforce RI or ignore it (if ignored, RI must be verified via Check utility)
– SAMPLIB: DB2LOAD

• CDB SuperLoad
– Faster way to load a DB2 table
– Automatic image copy, if desired
– Enhanced data conversion
– Load into multiple tables, from multiple input files
– SAMPLIB: CDBLOAD

Integrity Utilities

• Check
– Verifies all RI on a table space
– Verifies table constraints
– Resets ‘check pending’ flag, usually set by Load utility, if constraints were not enforced
– Will insert all invalid rows into a separate table for review, if requested
– SAMPLIB: DB2CHECK



Unloading Tables

• BSCTIAUL
– Modified version of IBM-supplied sample program DSNTIAUL
– Uses dynamic SQL to unload table(s) to sequential file(s)
– Also generates DB2 Load utility control statements
– Can use output to (re)load table

– Uses:
• Data transfer (e.g., production to test)
• Data archival
• Simple data editing
– SAMPLIB: BSCTIAUL


• CDB SuperUnload
– Quick way to unload table data to sequential file
– Can unload from:
• Table itself
• Full/partial image copy
• DSN1COPY file
– Can unload subset of data via extensive filtering options
– Can sort output
– Generates Load utility statements
– SAMPLIB: CDBUNLD


Data Reorganization

• Reorg
– Reorganizes table and/or index spaces
– Use to put certain table/index space changes into effect (e.g., PRIQTY,SECQTY, SEGSIZE, etc)

– Deletes and reallocates underlying datasets
– Can use as unload - Unload External
– Can delete rows
– SAMPLIB: DB2REORG

• CDB SuperReorg
– Faster Reorg
– SAMPLIB: CDBREOR


Statistics and Reporting

• Runstats
– Updates DB2 catalog with current statistics regarding table space, table, column and index information
– These statistics are used by the optimizer to determine access paths
– Plans/packages should be rebound to take advantage of any updated information
– SAMPLIB: DB2STATS

• Report Recovery
– Provides listing of all recovery-related events for table space(s)
– Use to identify datasets needed for recovery
– SAMPLIB: DB2RPTRC

• Repair
– Used to reset the following flags:
• Copy pending
• Recovery pending
• Check pending
– Also used by DBA to fix broken pages
– SAMPLIB: DB2REPR


Recovery Utilities

• Recover
– Restores table space to consistent state,using log and/or image copy files
– Recover to currency: useful if table space was modified outside of DB2
– Point-in-time (PIT) recovery:
• To specific RBA
• To specific image copy
• Separate index recovery required
– SAMPLIB: DB2RECOV

• CDB SuperRestore
– Faster recovery
– Recover test option
– SAMPLIB: CDBRSTR


DB2 Commands

– DISPLAY DATABASE
– STOP DATABASE
– START DATABASE
– DISPLAY UTILITY
– TERM UTILITY

• Syntax:
-command options
Ex. -DISPLAY DB(CLAS01DB)
• Issue via:
– DB2I, Option 7
– Platinum DB2 Command Processor (DB2C)


Display Database

• DISPLAY DATABASE
– Displays database and optionally table/index space status
– Use to identify any spaces in any kind of restricted mode (e.g., copy pending,recovery pending, etc)
– May help identify cause of -904 errors

• Syntax
-DISPLAY DATABASE(dbname)
SPACENAM(space-name)
LIMIT(*) RESTRICT


Result on Screen

• Partial output from display database command
– All index / table spaces are in RW status
-DIS DB(CLAS01DB) SPACE(*)
DSNT360I -DB2T ***********************************
DSNT361I -DB2T * DISPLAY DATABASE SUMMARY
* GLOBAL
DSNT360I -DB2T ***********************************
DSNT362I -DB2T DATABASE = CLAS01DB STATUS = RW
DBD LENGTH = 4028
DSNT397I -DB2T
NAME TYPE PART STATUS
-------- ---- ---- ------------------
MKDEPTTS TS RW
MKEMPTS TS RW
MKDEPTXB IX RW
MKDEPTX1 IX RW
MKDEPTX2 IX RW
MKEMPXB IX RW
MKEMPXB IX RW
MKEMPX1 IX RW
******* DISPLAY OF DATABASE CLAS01DB ENDED *******

Result on Screen

• Partial output from display database command
– Some spaces are in restricted mode
-DIS DB(CLAS01DB) SPACE(*)
DSNT360I -DB2T ***********************************
DSNT361I -DB2T * DISPLAY DATABASE SUMMARY
* GLOBAL
DSNT360I -DB2T ***********************************
DSNT362I -DB2T DATABASE = CLAS01DB STATUS = RW
DBD LENGTH = 4028
DSNT397I -DB2T
NAME TYPE PART STATUS
-------- ---- ---- ------------------
MKDEPTTS TS RW
MKEMPTS TS RW,RECP,CHKP
MKDEPTXB IX STOP
MKDEPTX1 IX RW
MKDEPTX2 IX RW
MKEMPXB IX RW,RBDP
MKEMPXB IX RW,RBDP
MKEMPX1 IX RW,RBDP
******* DISPLAY OF DATABASE CLAS01DB ENDED *******


Database Status Description
<
• Possible values for database status:
– RO The database is started for read activity only.
– RW The database is started for read and write activity.
– STOP The database is stopped.
– STOPP A stop is pending or is in progress for this DB.
– UT The database is started for utility processing only.

• Common values for space status:
– CHKP The object (a table space or a partition) is in check pending status.
– COPY The object (a table space or a partition) is in copy pending status.
– RBDP The object (an index space, index partition or logical index partition) is
in rebuild pending status. For logical partitions, status can also appear as
RBDP*.
– RECP The object (a table space, table space partition, index space, index
partition or logical index partition) is in recovery pending status.
– REORP The object (a table space or partition) is in recovery pending status.
– RO The table space, partition, index or index part is started for read-only.
– RW The table space, partition, index or index part is started for read write.
– STOP The table space, table space partition, index space or index space
partition is stopped.
– STOPP A stop is pending for the database, table space, table space
partition,index space or index space partition.
– UT The table space, table space partition, index space or index space
partition is started for utility processing only.
– UTRO A utility is in process on the table space, table space partition, index
space, or index space partition that allows only RO access.
– UTRW A utility is in process on the table space, table space partition, index
space or index space partition that allows RW access.
– UTUT A utility is in process on the table space, table space partition, index
space or index space partition that allows only UT access.



Stop Database

– Use to deallocate table/index spaces from the DB2 subsystem
– Required for certain types of ALTER DDL (MAXROWS)
– Required for certain “stand-alone” DB2


• Syntax
-STOP DATABASE(dbname)
SPACENAM(space-name)
• Example
-STO DB(CLAS01DB) SPACE(MKEMPTS)


Start Database

– Use to make database spaces available to DB2 subsystem
– Can start in any of the following modes
• RW - read/write (normal mode)
• RO - read-only
• UT - utility mode (no application access)
– Can apply to database or specific space

• Syntax
-START DATABASE(dbname)
SPACENAM(space-name)
ACCESS(mode)
• Example
-STA DB(CLAS01DB) SPACE(MKEMPTS)


Display Samples

-DIS DB(CLAS01DB) SPACE(*) RESTRICT LIMIT(*)
-DIS DB(CLAS01DB) SPACE(*) USE LIMIT(*)
-DIS DB(CLAS01DB) SPACE(*) ACTIVE USE LIMIT(*)
-DIS DB(CLAS01DB) SPACE(*) CLAIMERS LIMIT(*)
-DIS DB(CLAS01DB) SPACE(*) LOCKS LIMIT(*)
-DIS DB(CLAS01DB) SPACE(MK*)
-DIS DB(DSNDB06) SPACE(SYSDDF:SYSVIEWS)
-DIS DB(PWSE*) SPACE(*) RESTRICT LIMIT(*)


Display Utility

– Provides status of one or more DB2 utilities currently in progress
– Can use generic name for utility ID
e.g. ‘*’ for all utilities; ‘PRGI*’ for all utility ID’s that start with ‘PRGI’

• Syntax
-DISPLAY UTILITY(util-id)
• Example
-DIS UTIL(SADIMK*)


Term Utility

– Terminate one or more utilities
– Same generic name rules as those for DISPLAY UTILITY
– Be careful with generics: don’t kill some one else’s utility by mistake

• Syntax
-TERM UTILITY(util-id)
• Example
-TER UTIL(SADIMK1.RECVR)

Monday, January 21, 2008

Few Useful FAQs/Interview Questions for Mainframe Beginers :

1. How to reconnect to Mainframes session when system says User already login ?
In Login Page check the Reconnect option with ‘S’ and then logon .. it will reconnect to the mainframe session

2. What is the basic use of directory blocks while creating pds ?
Directory blocks work like an index to the PDS and contain the member names of what is stored in the PDS. A directory block can hold approximately 6 member names so a PDS with 2 directory blocks can hold approximately 12 members and a PDS with 3 directory blocks can hold about 18 members

3.How to find How many members dose PDS has without opening it?
Open member in 3.4 optin and put ‘I’ to see the above information.

4.What is RESTART Parameter in JCL ?
RESTART Parameter is used to restart a job from specified/abended step manually. Below step shows how to start from step2 by skipping step1.

Eg: //Job1 Job Class=A, Restart = step2
//step1
:
//step2

5.How do you edit /resubmit a job which is available in spool ?
Use commands SJ or SE across (under column NP) the job in spool, and job will open in edit mode. Then sub the job. The changes made at this place are not reflected in actual job

6. How to open new session and swap between the screens ??
Use START command in command line to open new session or Put List Command line and use F9 Key .. u get a pop window ..select start new session option there

Use F9 key to swap between the session.

7. I have opend 10 screens. How to got to 9th screen ?
Put 9 on command line and press key F9 .. it will take u to 9 the screen. OR

Other way is to name your screen by some name.
a. Use the command screenname SA and enter
b. To get back to this screen, use SA in command line and press F9

8.Can a input/output file can have a record length of more than 80 ?
Yes, an input and output file can have file record length of more than or less than 80.
Only report file has a fixed length of 133 bytes of which 1 byte is used for line control by system

9.What is the length of Report ?
Record length of file should be 133 only, of which 132 bytes is used for data to be printed and one byte is used by printer for line control information

Eg : Example for Report defination
01 FD Report-rec
05 Rep-cntl PIc X(01) -- used by systen for line control info.
05 Rep-Rec PIC X(132).

10. What are Redifines ??
Redefines is used to share the same memory by different variable for reusability. This way we can redefine Numeic as Alphanumeric and vice versa... This is basic advantage of redefines.
Eg :
05 Ws-Alpha Pic X(40)
05 Ws-Num Redefine Ws-Alpha PIC 9(40)