View Full Version: How Do You Identify Pid Of Lawson App

LawsonTalk > System Admin > How Do You Identify Pid Of Lawson App


Title: How Do You Identify Pid Of Lawson App
Description: Identify PID of Lawson App


tcollier3 - November 19, 2007 05:00 PM (GMT)
How do you identify the PID during execution of a Lawson APP. For example, running RD30 and I want to identify the PID associated with this execution while it is processing. Trying to create temporary files based on PID.

schroncd - November 19, 2007 05:29 PM (GMT)
Try this:

ps -ef | grep $LAWDIR/logan/RD30 | awk '(print $2}'

Since you didn't tell us what OS you are using, this works on my Unix boxes..

tcollier3 - November 19, 2007 05:58 PM (GMT)
Yes it is UNIX. Is there a way to do it within the COBOL program, while it is executing?

Another option I was trying, is to call an external UNIX script to identify it and then return the value to the calling COBOL program (PID=$$).

Does that make sense?

schroncd - November 19, 2007 07:04 PM (GMT)
I'm a Unix geek, not a COBOL freak, so I'll leave the particulars to guys who know for sure, but I've seen many of my scripts called from COBOL progs. So I know it CAN be done..

g'luck!



Hosted for free by InvisionFree