You are on page 1of 5

Mainframes Tips

Table of contents

1 File Aid Switching between edit and Browse:....................................1


2 Parameters for creating a DDIO file:...............................................1
3 Parameters for creating a file for Reformat definition:........................2
4 Unstring:................................................................................2
5 Sending Broad Cast Message:........................................................3
6 USE of NRETRIEV:.....................................................................3
7 Replace characters in a file:........................................................4
8 Quick Option in File aid:.............................................................5

1 File Aid Switching between edit and Browse:

We always face a situation such that when we have opened a file in FILE-AID Browse mode but
later wished it was Edit mode and vice versa. There is a cool command available in FILE-AID to
help us in this type of situation.

If you are in Browse mode and want to change it into EDIT Mode, in the Line command issue:

COMMAND  GO EDIT

If you are in Edit mode and want to change it into BROWSE Mode, in the Line command issue:

COMMAND  GO BROWSE

Sometimes you search a record in file by going to M.F.1 and you map the record and then you
realise that the copybook used is incorrect…

To use the correct Copybook, we don't need to do F3, just type COMPILE at option and system
will allow you to change the copybook and then press enter. The pointer will be at the same
record.

2 Parameters for creating a DDIO file:

File-AID ------ VSAM Information - (Page 1 of 2 ) -- "DOWN " is not active


COMMAND ===>
Catalog: SYS1.TSOBM1.CATALOG
Cluster: 'NP1349.AIRS.DDIO'
Data: 'NP1349.AIRS.DDIO.DATA' Data Volume: PMP103
Index: Index Volume:
---------------------------------------
Data Component Information: Current Allocation Options:

Patni Internal
Device type: 3390 Load option: SPEED
Organization: RRDS Write check: NO
KSDS key length: 0 Buffer space: 53248
KSDS key location: 0 Erase on delete: NO
Average record size: 26617 Imbedded index: NO
Maximum record size: 26617 Replicated index: NO
Allocated Space: Unit Primary Secondary Reuse option: NO
Data: CYLINDERS 14 0 Share option: 4-4
Index: 0 0 Spanned records: NO
Dataset Date Information: Key ranges present: NO
Creation date: 2005/03/14 AIX-unique keys:
Expiration date: AIX-upgrade:
Modification date: 2005/08/22
Modification time: 06:07 AM GMT

3 Parameters for creating a file for Reformat definition:

File-AID ------------------ Dataset Information -----------------------------


COMMAND ===>

Catalog name: SYS1.TSOBM1.CATALOG


Dataset name: NP1349.AIRS.FILEAID

General Data:
Volume serial: PMP13B
Device type: 3390 Current Allocation:
Organization: PARTITIONED Allocated cylinder 1
Record format: VB Allocated extents: 1
Option code: NONE
Key length: 0
Record length: 80 Current Utilization:
Block size: 84 Used cylinders: 1
1st extent cylinders: 1 Used extents: 1
Secondary cylinders: 10

SMS Information: Dataset Date Information:


Storage class: SCPRIME Creation: 2005/02/08
Data class: NULL1VOL Expiration:
Management class: MC1825EP Last reference: 2005/08/22
Dataset name type: PDS

Patni Internal
4 Unstring:
If you want to break a single variable into two or more variables then use the UNSTRING
command...
Syntax: UNSTRING ws-variable delimited by ' ' into variable1 , variable2.

Example: If we want to brake a name-field into first-name and middle-name then it will be
coded as :
UNSTRING WS-NAME DELIMITED BY ' ' INTO FIRST-NAME , MIDDLE-NAME

Note:
The difference between the CONTINUE and the NEXT SENTENCE statement?

CONTINUE is like a null statement (do nothing)


NEXT SENTENCE transfers control to the next sentence (I.e. control is transferred to line
occurring after the first period encountered)

For Example:
IF OUTER-CONDITION-IS-TRUE
IF INNER-CONDITION-IS-TRUE
CONTINUE
END-IF
DISPLAY 'ABC'
END-IF.

Since we have used CONTINUE in the example it will display 'ABC'. If we had used NEXT
SENTENCE instead it would not have displayed 'ABC'.

5 Sending Broad Cast Message:


If you want to send a message to another person logged on to TSO say...
"TSO SEND 'message_line' U(user_id)"
If the person is not logged on but you want to send a message which he/she can read when
he/she logs on say...
"TSO SEND 'message_line' U(user_id) LOGON"

Note:

If you want to find a member but don’t know the PDS to which it belongs and only know the
high level qualifier of the PDS then you can use the MEMBER command.

For example, let us consider the high level Qualifier as MYID.MYAPPLN.* and member as MYMEM
1. Go to 3.4 and list all PDSs with MYID.MYAPPLN.*
2. Now issue, MEMBER MYMEM on the command line.

6 USE of NRETRIEV:

Use NRETRIEV…

1. Enter KEYS in the command line, KEYS window will popup.

Patni Internal
2. Set any key to NRETRIEV and exit.
3. Now when you are in 3.4 (or whichever screen you have set the keys option), press the
assigned PF keys.
4. Pressing repeatedly will bring up one-by-one the last 30 accessed datasets from the reflist.

7 Replace characters in a file:

You can replace characters in a file irrespective of the value contained in them at a specific
position with some predetermined character.
Open the file in edit mode and at the command level give the following command:

C ALL <POS> P’<SHIFT + 6>’ ‘<STRING>’

Example: Suppose I want to have character ‘LO’ at 20th position irrespective of the value
already existing, then I type the following…
C ALL 20 P'¬¬' 'LO'
…and save the file.

Patni Internal
8 Quick Option in File aid:
In a VSAM file we want to search for a value '77777' and we know it starts from 52nd position,
then in quick seach panel we type...
52 EQ '77777'
But if we don't know the position of that field, we can just type in...
1 CO '77777'
This will list all the combination of the value '77777' present in the file, from which we can
find the relevant field.

Note: The IDCAMS utility cannot be executed without the 2 DD statements:


SYSPRINT
SYSIN

Note:
If RECFM is coded VB in JOB then the LRECL is increased by 4 in addition to the record length
defined in the program.

Note:
Consider this situation. I am doing a verification on an output file. The output file has 200
fields. I need to verify 25th and 175th fields only. I am using FILE-AID's VFMT mode and for each
record I am scrolling between 25th and 175th field. Is there any efficient way to handle this
situation?

Yes...In the VFMT mode, issue DISPLAY 25 175 ONLY.


Only 25th and 175th fields will be displayed.

Patni Internal

You might also like