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.
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..
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?
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!