1. Write a Hello World Cobol Program
Create the JohnPaulSample program using the Vim editor as shown below.
$ sudo gedit JohnPaulSample
Note:
Types of Editor in Linux
1. Gedit
2. Kedit
3. Emacs
4. Anjuta
5. Nano
6. Vim
7. JEdit (Open Source Java Code Editor)
My Sample Program in Cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. JohnPaulSampleProgram.
PROCEDURE DIVISION.
DISPLAY 'Hello John Paul!'.
STOP RUN.
Note: Comment in Cobol starts with *.
2. Make sure Cobol Compiler is installed on your system
Make sure Cobol compiler is installed on your system as shown below.
$ whereis cobc
cobc: /usr/bin/cobc /usr/share/man/man1/cobc.1.gz
Note:
whereis - command in linux for looking faster for a specific path or directory of file or package.
$ which cobc
/usr/bin/cobc
Installing COBC compiler
If you don’t have cobol compiler, install it as shown below.
$ sudo apt-get install open-cobol
Note
sudo - super user do. (Admin privileges)
3. Compile the cobol program trought Terminal
Compile the JohnPaulSample which will create the JohnPaulSample executable.
$ cobc -free -x -o JohnPaulSample-exe JohnPaulSample
$ ls
JohnPaulSample JohnPaulSample-exe*
* -free – use free source format. Without this option cobol program requires certain format.
* -x – build executable program.
* -o FILE – place the output file into the specified FILE.
4. Execute the cobol Program
Execute by mentioning the program name.
$./JohnPaulSample-exe
Hello John Paul!
Monday, October 18, 2010
Saturday, October 16, 2010
How to Configure RIP in a Cisco Router
NOTE: RIP - Router Interface Protocol
1. enable the RIP protocol on the router with the ‘router rip’ command.
Router(config)#router rip
2. trace the network to be used directly connected to the router.
Router(config-router)#network 192.168.0.0
Note:
Remember use Supernet if you have a group of subnets.
Router(config-router)#network 172.69.0.0
there are 3 subnets in the supernet
3. Adjust the update, invalid, holddown and flush timers.
Router(config-router)#timers basic 30 190 280 260
4. Stop the updates from being broadcasted on internet.
Router(config-router)#passive-interface Fa0/0
5. RIP, sends updates as broadcast. If the router is connected through non-broadcast networks (like FrameRelay).
Router(config-router)#neighbor XXX.XXX.XXX.XXX
Where XXX.XXX.XXX.XXX is the IP address of the neighbor.
6. Cisco's implementation of RIP Version 2 supports authentication, key management, route summarization, classless interdomain routing (CIDR), and variable-length subnet masks (VLSMs).
Router(config-router)#version 2
And if you like to stick to version one, just replace the 2 in the command above with 1.
Note:
Can control ther versions of the updates and recieved on each interface.
this will be determined in 'IP rip' and 'IP Rip Version'.
Router(config-if)#ip rip send version 2
Router(config-if)#ip rip receive version 1
7. Check the RIP configuration using the ‘show ip route’, ‘show ip protocols’, and ‘debug ip rip’ commands.
1. enable the RIP protocol on the router with the ‘router rip’ command.
Router(config)#router rip
2. trace the network to be used directly connected to the router.
Router(config-router)#network 192.168.0.0
Note:
Remember use Supernet if you have a group of subnets.
Router(config-router)#network 172.69.0.0
there are 3 subnets in the supernet
3. Adjust the update, invalid, holddown and flush timers.
Router(config-router)#timers basic 30 190 280 260
4. Stop the updates from being broadcasted on internet.
Router(config-router)#passive-interface Fa0/0
5. RIP, sends updates as broadcast. If the router is connected through non-broadcast networks (like FrameRelay).
Router(config-router)#neighbor XXX.XXX.XXX.XXX
Where XXX.XXX.XXX.XXX is the IP address of the neighbor.
6. Cisco's implementation of RIP Version 2 supports authentication, key management, route summarization, classless interdomain routing (CIDR), and variable-length subnet masks (VLSMs).
Router(config-router)#version 2
And if you like to stick to version one, just replace the 2 in the command above with 1.
Note:
Can control ther versions of the updates and recieved on each interface.
this will be determined in 'IP rip' and 'IP Rip Version'.
Router(config-if)#ip rip send version 2
Router(config-if)#ip rip receive version 1
7. Check the RIP configuration using the ‘show ip route’, ‘show ip protocols’, and ‘debug ip rip’ commands.
Subscribe to:
Comments (Atom)