Set License for Micro-Focus Cobol

Howto install latest cobol on 5.3

1. Get the image from cd
2. Untar in the /opt directory: cd /opt ; tar -xvf $DIR/cobol.tar (name or format may be different)
3. cd /opt/microfocus/cobol
4. ./install
5. Agree to License
6. Look at environment (by hitting space) and confirm that you understand it
7. Pick no to use without Java
8. Pick yes to install LMF, stop currently running if necessary
9. Allow only superuser access to License Admin System
10. Let it start at next bootup ( the /etc/mflmrcscript runs, notice that it points to the license manager now installed in /usr/lib/mflmf, not the one under /opt)
11. Pick 64 bit environment

Howto set the correct license for cobol:

1. cd /usr/lib/mflmf
2. ./mflmcmd (if this fails with a corrupt database error, run lmfdbrecover)
3. Enter capital I to install your license:

For 1 User:
COBOL Serial Number: PEOPLESOFT-SX-DEV64
COBOL License Code: 12345 12345 12345 12345 12345

It will either say the license is now installed or is already in the database.

4. Start the license manager with the rc script: /etc/mflmrcscript ( you should see mflm_manager running )

Howto Check license with apptrack (although the license manager mflmf is under, /usr/lib/mflmf, the application server license checker is under /opt)

1. export COBDIR=/opt/microfocus/cobol
2. cd /opt/microfocus/cobol/aslmf
3. ./apptrack (pick option 1, license list), the other install options don’t really work here

Compile and run a test cobol program:

1. export LD_LIBRARY_PATH=/opt/microfocus/cobol/lib
2. PATH=$PATH:/opt/microfocus/cobol/bin
2. cd /opt/microfocus/cobol/demo
3. cob64 hello.cbl
4. cobrun hello.int

——————————————————-

Here is how to install a later version:

# ./mflm_cmd

Micro Focus License Manager Command Line Interface
————————————————–
Select the function you require from the list:
License Install – Enter ‘I’
I
Ready to install license
Enter the Serial Number part of the License Key:
90000000999999+
Enter the License Number part of the License Key:
12345 12345 12345 12345 1234
License added ok

# cd /usr/lpp/cobol/aslmf
# ./apptrack
You must set an access password, before proceeding
Enter 6 characters as the password
(6 spaces removes password) just hit space bar 6 times
******
Please re-enter the new password
******
Password removed

Application Server License Administration System – AppTrack
———————————————————–
1. License List
2. License Summary
3. License Install
4. License Uninstall
5. Change/Set Password
6. Reinitialize Licensing
7. Current Users
9. Quit
Enter the Menu Selection

Ready to install license
Enter the Serial Number part of the License Key:
90000000999999+
Enter the License Number part of the License Key:
12345 12345 12345 12345 1234
License installed ok

Install Samba on AIX

1. Install rpm packages for samba from IBM freesoftware site:

samba-2.2.7-4.aix4.3.ppc.rpm
samba-common-2.2.7-4.aix4.3.ppc.rpm

2. Run smbpasswd as root to set initial uesr password same as real user password:

# smbpasswd -a jrigler

3. As root, run swat

4. Connect to server through browser on port 901 and configure.

5. To connect from Windows:

net use n: \\servername\share /USER:username

6. To test the UNC (Universal Naming Convention) connection:

NET USE \\servername\share password /USER:username

dir \\servername\share\subdir\subdir

Note: to disconnect from windows: net use n: /del

New and improved Samba at Bull

Bull Freeware

Samba was never a seamless integration with Windows, you could get the samba drive mounted up and it would work, but it never looked quite the same as other windows drives when users where searching and clicking on their little folders. After a lawsuit, Windows finally released enough information to allow Samba to be better and the bull site has a compiled version.

The Written Word – maybe they have figured out secure curl

A while back I tried to get my AIX servers to talk to some Windows servers in their secure protocol. It is called ftps (Secure FTP) and appear be build on a higher version of ssl with tds encryption. It seemed that the only way this was possible from AIX was by using curl with special ssl encryptions set. This month, The Written Word claims to have a compile of this. Last time I tried a demo of their stuff, it core dumped on me, but maybe this is better:

The Written Word

Process to consume memory for testing

This isn’t very pretty or precise, but it does eat up a ton of memory. Use svmon -P or svmon -S PID to see what is going on:

#include 
#include 

#ifndef BUFSIZE
#define BUFSIZE 20480
#endif

#ifndef NBUFS
#define NBUFS 81920
#endif

int main(void)
{
size_t nbytes = 2147483647;
char *p[9555559];
char *q[9555559];
char *r[9555559];
char *s[9555559];
int x;


if (nbytes == 0)
nbytes = 1;

(void) printf("Allocating %zu bytes\n", nbytes);
(void) fflush(stdout);

for (x = 0 ; x < 9555559 ; x = x + 1 )
{
p[x] = malloc(nbytes);
q[x] = malloc(nbytes);
r[x] = malloc(nbytes);
s[x] = malloc(nbytes);

}

(void) pause();
return (EXIT_SUCCESS);
}

Also, here is an svmon script for all processes:

ps aux | while read A B C
   do
  svmon -P $B | grep $B
   done

Sending urgent messages from unix

In AIX, in order to add the ‘Importance: High’ tag, it appears that you have to preformat your message and send it through sendmail. This can be done with a special message tag file:

contents of urgent_head:

Subject: test
MIME-Version: 1.0
Importance: High
From: name@domain.com

cat urgent_head /etc/motd | /usr/sbin/sendmail user@domain.com

This works in AIX and two of the linuxes that I tested which alias to mta. I am still trying to figure out the one that aliases to exm.

Don’t panic if your boot hangs on led 538

538 The configuration manager is going to invoke a configuration method.

Tonight, we had to reboot one of our servers after an old version of powerpath freaked out while discovering LUNs. The LUNs were discovered again on boot and we set on 538 for about 15 minutes. When you are used to the whole LPAR coming up in less then 10 minutes, this can be scary, but just as we were about to make other plans, the led moved on and cfgmgr finished.

When trying to bring the same LUNs online in normal mode, the server would hang on 538 forever for some reason, I suspect it is because we are at 5200-08 and powerpath 3.0.4.0, really old stuff.

Of course something similar happens when installing upgrades, it seems to hang forever.

If the network config is wrong, it will get past config manager and hang on NSF or something like that. In this case, I usually boot up with an alternate profile that doesn’t have any network adapters, then from the console I just rmdev everything and then reboot back with my old profile. Works every time.

We saw this again later and it took more like 40 minutes but then came up.

Error reporting test message

Since we have tricked out errpt to email messages to us, it is also good to make a test to periodically tell us that we haven’t forgotten to do this from a system. The errlogger command is great for this and can be used in conjunction with dsh to fan across your entire environment:

dsh sudo errlogger “test message”

Then you have to check your emails for test messages:

------------------------------------------------------------------
LABEL:		 		 OPMSG
IDENTIFIER:		 AA8AB241

Date/Time:       Thu Oct 30 11:40:51 CDT 
Sequence Number: 85501
Machine Id:      00CDEAEA4C00
Node Id:         nad0019aixp02s1
Class:           O
Type:            TEMP
Resource Name:   OPERATOR        

Description
OPERATOR NOTIFICATION

User Causes
ERRLOGGER COMMAND

		 Recommended Actions
		 REVIEW DETAILED DATA

Detail Data
MESSAGE FROM ERRLOGGER COMMAND
test message