Friday, March 30, 2012

Tips on ISPF

Tips on ISPF
1. How do I create multiple instances of ISPF sessions?
A. Use PDF command from the TSO panel, which will initiate a new ISPF session, Type =x to comeback to previous ISPF session. You can also type 'start' to initiate a new ISPF session, in this case you have to swap to go to the other session. You can have as many as 6 sessions open.( This command is installation specific)

2. I want to clear off the PF keys that are shown at the bottom of my ISPF panels.
A. Use command ‘PFSHOW OFF’ on command line. If you want to turn it on, issue ‘PFSHOW ON’.

3. I typed ‘/’ before pressing some Pfkey and this takes me to some other session
A. Character ‘/’ is used as a jump character for going to TPX screen in most of the installations. Therefore typing ‘/’ preceded by a PFkey is as good as going to TPX main menu and going to the corresponding session.

4. How do I see someone else’s jobs in IOF/SDSF?
A. In IOF menu give 'userid' in SCOPE field. In SDF you may have to type ‘ u xxxxx’ where xxxxx is the id or some other option will be available.

5. How do I compare a specific column in two files on ISPF?
A. Go to Option 3.13 (SUPERCE) and type 'edit'. You can give your compare options here. Also, you can specify many other options such as ‘treat certain records as comments’ etc.

6. How do I recover a Dataset I deleted by mistake, or maybe overwrote?
A. Use the TSO command HRECOVER, you’ll have to mention the generation or date of the backup you want restored. You can restore it to a new dataset. Usually, HRECOVER option can be found in ‘HSM’ utility panel.

7. How do you allocate a file similar to existing production file thought a job?
A. Specify production file as Model dataset. If you want to allocate a file similar to another file you can use the LIKE command and override any DCB parameter that you want different in your file.

8. How do I create a sequential file from VSAM file?
A. Use IDCAMS utility with the repro command. You can create a VSAM from a sequential file: the only condition is the sequential file should be sorted on the key fields.

9. How do I compare VSAM datasets?
A. Use either compare option in file-aid or ‘comparex’ utility or ‘data-xpert’ utility.

10. How do I know which version of Cobol compiler I am using?
A. Look at the first line of your compilation listing

11. How do I find out which base cluster does an alternate index file belong to?
A. Display information in file aid for the '.PATH' file which will show the base cluster as well as corresponding alt index file.

12. If I am using 3.4 and try to create a new member in an empty PDS, I can’t ?
A. Use option 2 and the new member name.

13. I got a B37 abend when tried to save the file.A. Your PDS is out of space. Start another session open this PDS in 3.4 and put a ‘z’ next to it. It will compress the PDS. All x37 abends are ‘out of space’ situations.

14. I got an error message ‘NO SPACE IN DIRECTORY’ while creating a member in PDS.
A. Your PDS can no longer accommodate more members in it. You need to increase the ‘Directory blocks’. Each directory block can hold at least 4 members.

15. I want to copy only the first 500 records of my file.
A. Use file-aid or dataexpert and give the number of records in the option.

16. The dataset I want is migrated, but I don’t want my screen to be frozen when I recall it.
A. Type HRECALL next to the dataset name in 3.4

17. I want to send a message to another person logged on to TSO

18. Say ‘ TSO SEND ‘message line’ U(user_id)’. If the person in not logged on but you want to send a message which he can read when he logs on say ‘ TSO SEND ‘message line’ U(user_id) LOGON’

19. I want to see the LIMIT of a GDG.
A. Use LISTCAT in TSO or File-Aid option 3.2

20. I want to know the % free and other statistics of my dataset.
A. If you press ‘right or PF11’ on your 3.4 listing you can see the dataset statistics or use option 3.1 and I

21. I keep using certain commands that I want to save.
A. The commands you use regularly can be saved as a function key. E.g. – if you often change a JCL, save it, submit it and then go to the job spool. You could save a PF key as ‘save; sub; =IOF’ . To do this type ‘KEYS’ on ‘command line’ and make the necessary entries.

22. I am not able to delete a dataset that resides on a tape.
A. Yes. You cannot delete/rename a tape dataset. Only you can uncatalog it.
ISPF Editor

23. How do I see only those lines that contain a particular string?
A. Type ‘X all’ then ‘F all ‘search-string’

24. Now I want to see only those lines that contain a particular value in the display I get after doing an ‘X all, F all’.
A. Type ‘ F new_value all nx’. ‘nx’ will restrict the search only to the displayed lines.

25. How do I go to a particular line numbers ?
A. Use ‘L search-string’ command. This is the Label command.

26. I want to find for a search-string that is Not prefix/suffix of another word. I want to find for an instance of a search-string that is whole word by itself. How can I do this?
A. Use keyword ‘word’ at the end of find command. E.g., ‘f job word’ will find for the whole word ‘job’.

27. How do I specify the direction of search i.e., how do I search for a string in backward / forward direction (w.r.t., your current cursor position)?
A.
Direction
Keyword
Example
Backward
PREV
F ‘job’ PREV finds for string ‘job’ in backward direction
Forward
No need to mention any keyword. It’s default direction
F ‘job’ finds for string ‘job’ in forward direction.
From the beginning of the file
FIRST
F ‘job’ FIRST finds the first instance of sting ‘job’ in the file.
Count of all instances in file
ALL
F ‘job’ FIRST finds the first instance of sting ‘job’ in the file and gives total-no-of-instances of sting ‘job’ in the file.

28. How do I search for a value say '0980312' stored in comp-3 format?
A. Type F X’0980312’.

29. How do I do case sensitive search find for a given search-string?
A. Just, enclose the search-string within quotes and have a letter C in front of the string itself. For e.g., F C’FindMe’ will find all FindMe strings only if the case matches.

30. How do I find for any non-blank characters?
A. Use picture string ‘^’. E.g., “F P’^’ 36” will find the next non-blank characters in column 36.

31. How do I find for any numeric character?

32. Use picture string ‘#’. E.g., 1. “F p’#’” finds the next numeric character. 2. “F ‘PAGE ##’ will find the next instance of the string ‘page followed by a blank followed by 2 numeric characters’.

33. How do I find for any non-numeric character?
A. Use picture string ‘-’.

34. How do I find for any alphabetic character?
A. Use picture string ‘@’.

35. How do I find for any uppercase alphabetic character?
A. Use picture string ‘>’.

36. How do I find for any lowercase alphabetic character?
A. Use picture string ‘<’.

37. How do I find for any non-display character?
A. Use picture string ‘.’ E.g., “f p’.’” finds the next instance of non-display character.

38. How can I split a line in ISPF editor?
A. Key in ‘TS’ in columns 1-6, position cursor at a point from where you want to split the line and press ENTER. This will result in splitting the line: the contents of line from where the cursor is positioned goes to the next line and the remaining portion will be retained in that line itself.
---TS--- This is first portion. It’s been split here.
^ Cursor is placed here.
Upon hitting ENTER, it splits into 2 lines as below:
-------- This is first portion.
-------- It’s been split here. ! next line

39. How do I join 2 lines?
A. You can do this by using overlay command. For e.g.,
-------- This is line-1.
-------- This is line-2.
Say, you want to join these 2 lines. First, you need to move the 2nd line to the position from where you need to join it in the first line. Then, key in ‘M’ in columns 1-6 of 2nd line and ‘O’ in columns 1-6 of 1st line.
----O--- This is line-1.
----M--- This is line-2.
Upon hitting ENTER, line-2 joins line-1.
-------- This is line-1. This is line-2.
NOTE: If you key in ‘C’ instead of ‘M’ in the 2nd line, it joins the 2nd line to the first line and also retains the 2nd line.

40. How do I see the value of the field stored in comp-3 format?
A. Type HEX ON and go to the location of the field and get the value from the two lines displayed below it.

41. How do I get rid of the 4 to 5 message lines displayed at the beginning of the file in ISPF edit?
A. Use ‘RESET’ command.

42. How do I stop the standard numbers on Col 73-80 in the ISPF editor?
A. Type ‘NUM OFF’. Some Clients use Col 73-80 to mark their changes, in that case you HAVE to have NUM OFF as the option.

43. How do I make columns 1-6 disappear from my ISPF editor screen?
A. Type 'NUM ON COB’. These are the ‘COBOL numbers’ columns and the screen display will be from Col 9-80.

44. How do I make the numbers on Col 1-6 contiguous, i.e., the COBOL numbers
A. Type 'RENUM'. ISPF sometimes recommends you to do this. You can ignore it.

45. How do I replace a particular value in a particular column with a constant value?
A. Type c ‘from_value’ ‘to_value’ 6 all. If you want this change in a particular range of rows, you’ll have to block the rows with ‘xx’ and say ‘c from_value to_value 6 x all’. Here ‘6’ is the column number.

46. I want to copy a block of records from one dataset to another.
A. Block the records and type ‘CUT’ at the command line. Open the other dataset in edit mode and type ‘PASTE’ at the command line and type ‘a’ or ‘b’ on the row after / before which you want these records.

47. I have a file of record length 240 and want to know in which column the value I am looking at occurs.
A. Say cols on the Command line if in browse mode and in the column command if in edit mode.

File-Aid

48. How do I get record length of a copybook?
A. Use File-aid option 8

49. File aid says insufficient memory?
A. Increase region size in TSO logon prompt.

50. Above option is tried but still complete file is not displayed.
A. Use initial records & skip options.

51. How do I overlay a field with a particular value for all the records in a file?
A. Use file aid 3.6 option

52. I have multiple record layouts in the copybook. How do I select the record layout of my choice for viewing the file in FileAid?
A. Type the command USE on command prompt which will show a list of available record lay-outs and you can choose one from them.

53. How do I make file-aid select different record layouts automatically depending upon data content?
A. Use XREF which allows you to specify what rec lay-out to use under which conditions.

54. In file-aid if I am viewing a file in the formatted mode, how to I go to a particular field?
A. Type ‘L field_name’.

No comments:

Post a Comment