- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- regarding system functions in ovms
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2007 10:15 PM
тАО08-06-2007 10:15 PM
regarding system functions in ovms
I have below two queries:
q-1) I want to change file format from "Variable type" to "stream_lf" format using C code in OVMS platform.
Please let me know how can I change the file format and what system function should I use?
q-2) I want to execute a portion of the code depending on which process calls that function. How do I make know the function, foo that process, "test" has called it?
code snippet:
void function foo(int a, int b)
{
a = a *b;
if (process_test has callled) /* "test" is a process running in the system */
{
a =a/b;
}
}
regards
ajaydec
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2007 10:35 PM
тАО08-06-2007 10:35 PM
Re: regarding system functions in ovms
http://h71000.www7.hp.com/doc/83final/4493/4493pro_006.html#4493_conv_chap
You can obtain the current process name using LIB$GETJPI
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2007 12:57 AM
тАО08-07-2007 12:57 AM
Re: regarding system functions in ovms
> file format [...]
Are you trying to do something like:
CONVERT file1 file2 /FDL = SYS$INPUT
RECORD
FORMAT stream_lf
or something like:
SET FILE /ATTRIBUTES = RFM: STMLF file
???
Or are you trying to create a file in C with
the right attributes in the first place?
> [...] depending on which process calls that
> function.
A process doesn't call a function, a program
does. Exactly what are you trying to test
here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2007 01:04 AM
тАО08-07-2007 01:04 AM
Re: regarding system functions in ovms
As Ian indicates, calleable convert is the right way to go. You would have to pass convert an FDL file reading: "RECORD; FORMAT STREAM_LF;" no more, no less.
If this happens less than a few times per hour, then it is tempting to spawn a process to convert the file using something like:
sprintf (cmd, "convert/fdl=stream_lf %s %s", old, new);
system(cmd);
q-2) I want to execute a portion of the code depending on which process calls that function.
First, you would have to decide what makes a particular process unique so you can identify it.If that is based on the process name, then you can use SYS$GETJPI or LIB$GETJPI output to get the process name as Ina indicates.
Or maybe a c rtl call like 'getuid', or get the image name from getjpi or the 0 program argument.
More likely you want to use an environment variable, or a command line argument to indicate what to do next.
Finally, if you have mroe questions about this, then please clarify the statement "which process calls that function"
Processess do not call functions.
Processess run images which call functions.
The function can be linked with the image, or in a static library or in a dynamically actived dynamic shareable library. The exact method used may offer further opportunities for solutions.
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2007 01:12 AM
тАО08-07-2007 01:12 AM
Re: regarding system functions in ovms
Steven wrote "A process doesn't call a function, a program does. Exactly what are you trying to test here?"
Greate minds...
Hein.