Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Calling "nice" from MF-COBOL on the UNIX platform
Does anyone happen to have a sample of code where you've called the
"nice" function to give the current process a higher priority on the
system? I know it can be done, but am having trouble pinning down the
exact syntax/parameters of the call.

System Information
------------------
OS:    HP-UX 11i
COBOL: MF OC 4.2

Thanks in advance for any/all assistance.

Chris

Report this thread to moderator Post Follow-up to this message
Old Post
Chris
03-27-04 03:59 AM


Re: Calling "nice" from MF-COBOL on the UNIX platform
Stephen,

Thank you. Your post is exactly the information I was looking for.

Chris

Report this thread to moderator Post Follow-up to this message
Old Post
Chris
03-27-04 03:59 AM


Re: Calling "nice" from MF-COBOL on the UNIX platform
Xref: kermit comp.lang.cobol:85890

01 PUFF-NICE.
3 NICE-GRUND            PIC X(07) VALUE "nice   ".
3 NICE-RUN              PIC X(65).      *> for programname
3 NICE-REST             PIC X(42) VALUE
">/dev/null>&2/dev/null& echo $!>".

01 MF-CBID.
3 MF-CB-ZEILE.
5 FILLER      PIC X(06)  VALUE "sh -c ".
5 FILLER      PIC X(01)  VALUE X"22". *> "
5 W-CMD-RUN PIC X(99).
5 FILLER    PIC X(01)   VALUE X"22".
5 MF-CMF-N  PIC 99 COMP VALUE 00. *> end

for example you will start a program "stocklist"
in background mode, so you do

move "cobrun stocklist &" to nice-run.
move puff-nice   to   w-cmd-run.
call  "SYSTEM"   using mf-cb-zeile.

This is running on HP-UX 10.20 and Linux etc.
Depending on platform  the NICE-REST perhaps
NICE-GRUND can be a little different, but it is
no problem to fill it on begin of the whole application
with correct os-depending-values.






Chris wrote:

> Does anyone happen to have a sample of code where you've called the
> "nice" function to give the current process a higher priority on the
> system? I know it can be done, but am having trouble pinning down the
> exact syntax/parameters of the call.
>
> System Information
> ------------------
> OS:    HP-UX 11i
> COBOL: MF OC 4.2
>
> Thanks in advance for any/all assistance.
>
> Chris

--
Vaclav Snajdr

Report this thread to moderator Post Follow-up to this message
Old Post
Vaclav Snajdr
03-27-04 03:59 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:23 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.