Wednesday, May 25, 2011

ISPF - TIP #010

What are all the last 25 COMMAND LINE commands that you have issued from ISPFpanel ?
How to know this?
Solution:
Type RETP on the Command line.

ISPF - TIP #009

While Browsing Internet, we have some cool option called address Autocomplete
we enter some letters in the address bar and the browser auto completes it with the closest guess.
Does MAINFRAME has the same feature??
Solution: Yes! It has “Autocomplete” feature!!!How to use it?
1.Go to ISPF 3.4 ,
2. Enter KEYS in the command line,KEYS window will popup
3. Set any key to AUTOTYPE, save and exit
4. Now type any Dataset partially and press the assigned PFkey!!
Note: It will not retrieve GDGs and VSAM files.

ISPF - TIP #008

Alternate to SuperCE Option(3.13)
Use the macro COMPARE
Use this when you there is less difference between the two files.
1.Open a DSN in EDIT or VIEW Mode
2. On the Command line , issue COMP 'YOUR.SECOND.COMPARISON.DSN'
3. If you want only the changes to be listed, issue COMP'YOUR.SECOND.COMPARISON.DSN' EXC

ISPF - TIP #007

How can I find the last 10 datasets that I have accessed ?


Solution:


1.GO TO ISPF 3.4 option.


2. On the top, there is a MENUBAR. Select REFLIST


3. Select Option 1 in it.


Using this option you can find out the last 30 datasets that you have accessed

ISPF - TIP #006

We usual 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.
for 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?

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

Tuesday, May 24, 2011

ISPF - TIP #005

While trying to open any member in a PDS, we sometimes come across "member in use" message.
In that situation, if you want to know who is using the membercurrently, press F1 twice.

ISPF - TIP #004

Any command entered in the COMMAND LINE disappears after the successful execution of itsintended function.If you want to repeat the same command , you got to re-type it or use some PF key to retrieve thelast command entered.
But here is a cool method the make the command entered not to disappear and stay on the screen.Precede commands with '&'
For Example:
COMMAND ===> &C '100-para' '200-PARA' SCROLL ===> CSR****** ************************ TOP OF DATA **************
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. PROGRAM1.
000003 DATE-WRITTEN. MAY 2011.
After the execution of the command, the below command stays on the screen.
This way you can entering the same command or modifying the command a little and using itmultiple times.

ISPF - TIP #003

Suppose you are in a ISPF Screen and want to know in which TSO Region ( Development,Production, or other TSO regions) you are now .

Solution:Issue on the command line : SAREAISPF STATISTICS Pop-up window will show you the region( and other info too)

ISPF - TIP #002

Usually the PDS or PS bears the ID of the creator or the ID of the person who modified itrecently.But is it possible to change these ID values without leaving trace of one’s own ID?

Solution:Yes its possible! In the command area against the member name or PS name, by giving ‘G’.Dialog box will pop up allowing you to change the ID values.

ISPF - TIP #001

Consider that you are editing a file/program and you want to know the changes you have donesince the last SAVE command.
How to find that?

Solution: Give COMPARE SESSION on the command line
Further use of COMPARE commands...
Can be used like 3.13 option

Saturday, May 21, 2011

SORT JCL to copy all the data from the input dataset to the output dataset

COMMON JCL FOR SORT
//SORTJCL JOB (XXXXXXXX,,,,,XXXX),' ',
// CLASS=M,MSGCLASS=T,
// REGION=0M,NOTIFY=&SYSUID
//*
//***************************************************************
//DEL EXEC PGM=IEFBR14
//DD01 DD DSN=Output dataset, *Deleting the Output file
// DISP=(MOD,DELETE),UNIT=SYSDA,SPACE=(TRK,(1))
//***************************************************************
//SETP001 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=Input dataset, *Input file
//SORTOUT DD DSN=Output dataset, *Creating output file
// DISP=(,CATLG),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)
//SYSIN DD *
SORT FIELDS=COPY
//*


This JCL is used copy all the data from the input dataset to the output dataset.

In the sort card, we can also give OPTION COPY instead of SORT FIELDS=COPY to do the same task.

Commonly used JCL for SORT

COMMON JCL FOR SORT
//SORTJCL JOB (XXXXXXXX,,,,,XXXX),' ',
// CLASS=M,MSGCLASS=T,
// REGION=0M,NOTIFY=&SYSUID
//*
//***************************************************************
//DEL EXEC PGM=IEFBR14
//DD01 DD DSN=Output dataset, *Deleting the Output file
// DISP=(MOD,DELETE),UNIT=SYSDA,SPACE=(TRK,(1))
//***************************************************************
//SETP001 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=Input dataset, *Input file
//SORTOUT DD DSN=Output dataset, *Creating output file
// DISP=(,CATLG),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)
//SYSIN DD *
YOUR SORT CARD WILL COME HERE
//*

How to keep your mainframes session always active?

The question raised by many freshers and new joiners in a organization who work in mainframes. All freshers and new joiners in a organization get the mainframe ID's from their colleagues and start doing their work. When they keep their session idle for sometime, their session get locked and they need to provide password to unlock. You can ask one or two times to the password owner to type his password in your system, but what if its goes beyond that, don't you feel little bad to ask. I got the solution to avoid such a feeling and it is pretty simple.




In the command input in your spool, just type &(seconds). Example: &60 (i.e) Your session will get auto updated for every 60 seconds(1 minute). Hence, your session will not get locked.

Summary:

From the start screen:
i. type s.st
ii. &seconds

But the real use of this option is to update your spool and to know whether the job execution is over or not. But no where it is written that we need to use this option only for this purpose.

Friday, May 20, 2011

IEFBR14 Utility

IEFBR14 is a very popular utility in IBM mainframes. Even though it is very popular, the service provided by this utility is "nothing".(i.e) It is a "do nothing" utility. This utility runs in all the IBM environments derived from OS/360, including z/OS.

In all IBM environments, the programs never specify files(input and output datasets) directly, but instead they were referenced through a JCL(Job Control Language) statements that invoke the program which needs to access these data sets. These datasets are given in the DD(Data Definition) statements which has a DISP(Disposition) Parameter that indicates how the data set is to be managed(i.e) a new file is created or old-file is re-used or the file is deleted upon completion or retained etc...

Even though the DD statements itself does the creation and deletion of datasets, it can't run without a program. Hence, a program that does nothing was required and that's how IEFBR14 utility came to picture. It always a success job. Those DD statements run under this program IEFBR14 to create and delete data sets. We can create PS(Physically Sequential) and PDS(Partioned Data Sets) from JCL.

Naming Convention:

The first three letters of the utilities has specific usage like "IEF" for programs produced by the job management group, "IEB" for data set utility programs, "IEF" for system utility programs, and "IEW" for program-linkage and -loading.

And the next portion of the program name, for example "BR14" means "branch to register 14", IEBUPDTE was the dataset utility (IEB) that applied updates (UPDTE) to source code files, and IEHINITT was the system utility (IEH) that initialized (INT) magnetic tape labels (T).

Example of IEFBR14 utility usage:

//jobname JOB account information .....
//stepname EXEC PGM=IEFBR14
//ddname DD DSN=dataset name,
// DISP=(MOD,DELETE,DELETE)


*DISP : Deletes the given dataset in the DSN parameter