At command line - SWAPBAR ON displays the list of all open screens at the bottom.
To swap to another screen - double click at the required screen
To remove SWAPBAR display - SWAPBAR OFF
Tuesday, March 15, 2011
Sunday, March 13, 2011
Check only particular lines in a program
Suppose the requirement is to check only few verbs for indentation etc - For ex: we want to check all the lines in the program which have the PIC clause so as to align it at a particular position -
Issue the command -
X ALL; F 'PIC' ALL
This command shows only those lines of code which have the PIC Clause
Issue the command -
X ALL; F 'PIC' ALL
This command shows only those lines of code which have the PIC Clause
File-Aid - is it possible to use relational operators??
For requirements like - Find records which are greater than a particular value at a particular position - Fileaid comes to our help :)
We can use relational operators like EQ, NE, LT, GT, LE, GE
Command -
FIND GT '1900' 25
This command searches for the record which has a value greater than 1900 at position 25
We can use relational operators like EQ, NE, LT, GT, LE, GE
Command -
FIND GT '1900' 25
This command searches for the record which has a value greater than 1900 at position 25
Avoid 3.4 option to view/edit a PDS or PS file
The usual way that all of us open a file is using ISPF 3.4 option and then give the name of the PDS or PS file
To avoid this we can use the option -
EPDF 'MYID.MYPS' - Dataset will open in edit mode
Similarly for view mode -
EPDF 'MYID.MYPS' VIEW
Or browse -
EPDF 'MYID.MYPS' BROWSE
Above commands are applicable for PDS as well
The only disadvantage with this option is - we have to type the full name of the PS/PDS file and something like MYID.MYPDS.* will not work
To avoid this we can use the option -
EPDF 'MYID.MYPS' - Dataset will open in edit mode
Similarly for view mode -
EPDF 'MYID.MYPS' VIEW
Or browse -
EPDF 'MYID.MYPS' BROWSE
Above commands are applicable for PDS as well
The only disadvantage with this option is - we have to type the full name of the PS/PDS file and something like MYID.MYPDS.* will not work
Sunday, March 6, 2011
Copybook structure using FILA
This tip is helpful for beginners, everyone else might know it :)
When we create a copybook in cobol, we have the PIC clauses for declaring the variables. Hence the starting position of each variable is difficult to find out.
For this, we can view the copybook using FILE AID option 8 - which gives the detailed structure of the copybook like starting position, ending position, length and type of field.
When we create a copybook in cobol, we have the PIC clauses for declaring the variables. Hence the starting position of each variable is difficult to find out.
For this, we can view the copybook using FILE AID option 8 - which gives the detailed structure of the copybook like starting position, ending position, length and type of field.
Saturday, March 5, 2011
SKIPREC and STOPAFT in Sort Cards
These are quite easy, but even then i went wrong a few days back so thought of putting it here
SORT FIELDS=COPY,
SKIPREC=1000
Now here in the output file the initial 1000 records are skipped.
SORT FIELDS=COPY,
STOPAFT=5000
This copies the first 5000 records in the output file and then the processing is stopped
Now, when we club both-
SORT FIELDS=COPY,
SKIPREC=1000,
STOPAFT=5000
Here first 1000 records are skipped, then from 1001 - 6000th records are written to output file.
But I was under the impression that only 4000 records will be written and hence i went wrong..
SORT FIELDS=COPY,
SKIPREC=1000
Now here in the output file the initial 1000 records are skipped.
SORT FIELDS=COPY,
STOPAFT=5000
This copies the first 5000 records in the output file and then the processing is stopped
Now, when we club both-
SORT FIELDS=COPY,
SKIPREC=1000,
STOPAFT=5000
Here first 1000 records are skipped, then from 1001 - 6000th records are written to output file.
But I was under the impression that only 4000 records will be written and hence i went wrong..
Search for a string using Sort Card
There are many scenarios where in we want to search for a particular string in a record but we are not sure at what position that string is. The sort card below solves the problem :)
SORT FIELDS=COPY
INCLUDE COND= (1, 80, SS, EQ, C'FIND STRING')
SORT FIELDS=COPY
INCLUDE COND= (1, 80, SS, EQ, C'FIND STRING')
1 - Starting position to search the string
80 - Length of the record/till the position where search has to take place
SS - Search string
FIND STRING - This is the string to be searched in every record of the file
Subscribe to:
Posts (Atom)