Thursday, January 3, 2013

Starting with REXX

Sample rexx program:

/* rexx */
Say 'hello world'


Save this in a pds member and just before the member give 'ex'... It would execute this rexx routine and give output as 'hello world'

Note: all rexx should begin with /* rexx */ in the comments... You can prefix or suffix any comment to it....

Say is equivalent to display in cobol...

Saturday, December 29, 2012

PL/1 Interview Questions

1. What is the difference between Based and Define?
2. What are the different storage classes in PL/1?
3. What are the file formats supported in PL/1?
4. Why do you need Translate?
5. How do you include an copybook?
6. What are the ways through which you pass value to an program from JCL?
7. Difference between main program and a sub program in PL/1?
8. Pseudo Variables in PL/1?
9. Difference between Do While and Do Until?
10. What are the different datatypes in PL/1?
11. How do you handle exception in PL/1?
12. Picture clause of TIME in PL/1?
13. Explain REENTRANT?
14. What are the different options in OPTIONS?
15. What is meant by REORDER option in PL/1?


Saturday, November 10, 2012

!! Important Mainframe Interview Questions !!

Some of the important Mainframe Interview Questions are listed below!!


1. Difference between STEPLIB and JOBLIB?

2. What is the use of MSGLEVEL in the job card?

3. In Which step timestamp is generated in the DB2-COBOL program compilation?

4. What is the picture clause of TIMESTAMP?

5. Difference between COMP and COMP-3?

6. What is the use of INSPECT statement?

7. How do you compare two files in COBOL?

8. What is Indexing?

9.  What is the maximum time limit in TIME parameter?

10. How to extract the duplicate records in a file?

11. How to copy only 100 records from 200th record?

12. What are the mandatory DDNAMEs required using IDCAMS utility?

13. What is the specialty of IEFBR14 utility?

14. Which utility is used to load and unload records from DB2 tables?

15. What are the ways to pass data to a COBOL program?

16. What is the use of SPLIT command in SORT utility?

17. What is the use of SUM=NONE command in SORT?

18. Difference between INREC and OUTREC?

19. Expand COBOL?

20. Explain DB2-COBOL program compilation steps?

21. While using cursor, in which command the query is executed?

22. Use of cursors?

23. What is SQLCA?

24. Difference between STOPRUN and GOBACK.

25. How do you set max-cc from a COBOL program?



 


Sunday, April 22, 2012

ISPF – List Last 25 COMMAND LINE Commands

What are all the last 25 COMMAND LINE commands that you have issued from ISPFpanel ?


Solution:
Just use the command RETP. This will open the “ISPF Retrieve Panel” and will show you the commands you’ve issued.
This is an easy way to not only check what you’ve been doing but also to re-run a command without having to type it all over again.



ISPF - TIP #006

We usually search for members in a PDS by the first string of the members.
Consider this situation:
I have a PDS and I want to search it for member only by middle string of the members.
e.g. there are some members like BESTJCL1,RESTJCL2,PESTCBL1, BESTCBL2,WESTCBL3,TESTASM1,BESTASM2...etc

I want to find members which have CBL in them.How can I search and find these members?

Answer:
Use ISPF 4.12 option.
Specify the dataset to be searched and the pattern of the string.
Specify the LANG type as COB
And select the browse option.

Monday, September 12, 2011

IDCAMS - Repro Command

Copying A Data Set:

Note :
The CFILE utility, which was used to copy sequential and ISAM data sets, is not supported. Neither are ISAM data sets. All users with ISAM data sets should convert them to VSAM.

This article describes how to use IDCAMS/REPRO to copy a data set. It is intended as a replacement for CFILE and is not intended as complete documentation on VSAM data sets or the IDCAMS utility.

IDCAMS is an IBM utility that allows you to create and manipulate VSAM data sets. It has several commands. You can use the REPRO command of IDCAMS to copy VSAM and non-VSAM data sets, VSAM clusters, and alternate indexes.

You cannot use REPRO to copy an entire partitioned data set (PDS) because REPRO does not copy the information in the directories. You can, however, use REPRO to copy individual members.

The IBM IEBCOPY utility should be used to copy an entire PDS.

The REPRO Command
The general form of the REPRO command is as follows:

REPRO parameter parameter -
parameter -
parameter

Parameters may be separated by either commas or blanks. You can continue the REPRO statement by coding a hyphen (-) as the last character of a line. The command and parameters may be typed anywhere betweeen columns 2-72.

JCL for Using IDCAMS and REPRO
The below example shows the JCL for a basic job setup to access IDCAMS. The INFILE parameter names the DD statement for the data set that is to be copied. The OUTFILE parameter names the DD statement describing the output or target data set. You would replace "indd" and "outdd" with DD names of your own choosing.

JCL to Use IDCAMS and the REPRO Command
//COPY JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines
/*ROUTE PRINT node.location
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//indd DD DSN= ... (describes the input data set)
//outdd DD DSN= ... (describes the output data set)
//SYSIN DD *
REPRO -
INFILE(indd) -
OUTFILE(outdd)
/*

Using REPRO to Copy a VSAM Data Set to A Sequential Data Set
//COPY JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines
/*ROUTE PRINT node.location
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//VSAM DD DSN=UF.userid.VSAM.DATASET,DISP=OLD
//SEQ DD DSN=UF.userid.SEQ.BACKUP,UNIT=SYSDA,
// SPACE=(TRK,(10,10)),
// DISP=(NEW,CATLG),
// DCB=(LRECL=104,BLKSIZE=1004,RECFM=VB)
//SYSIN DD *
REPRO -
INFILE(VSAM) -
OUTFILE(SEQ)
/*

REPRO Examples
The below example shows how to use REPRO to copy a VSAM data set to a sequential data set. You could use this to make a sequential backup copy of your VSAM data set. In this example, assume that your VSAM data set has variable-length records. The maximum record size is 100 bytes and you have embedded keys. When you specify your LRECL and BLKSIZE for your output data set, make sure they are at least 4 bytes longer than the longest record in your VSAM data set.

Using REPRO to Backup a VSAM Data Set
//COPY JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines
/*ROUTE PRINT node.location
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//OLD DD DSN=UF.userid.VSAM.DATASET,DISP=OLD
//NEW DD DSN=UF.userid.VSAM.BACKUP,DISP=OLD
//SYSIN DD *
REPRO -
INFILE(OLD) -
OUTFILE(NEW)
/*
This example assumes that you have already created the backup data set (using IDCAMS). The OLD DD name defines your original VSAM data set. The NEW DD name defines the output data set.

Optional Keywords for the REPRO Command
Suppose you want only to make a backup of part of your data set. You can use the SKIP(n) and COUNT(m) keywords on the REPRO command to delimit the records to be copied. The following form of the REPRO command would copy the input data set beginning with the 100th record and copy 500 records.

REPRO -
INFILE(VSAM) -
OUTFILE(SEQ) -
SKIP(99) -
COUNT(500)

Thursday, June 30, 2011

ISPF - TIP #020

Here is another tip on ISPF 3.4 option.
From the ISPF 3.4 option listing, I can directly Edit/Browse/view the member without listing all the members and then select the particular member.
Solution:
To do that, In the Line command issue, E / (member)use for Browse (B) and view (V) Command - Enter "/" to select action Message Volume