- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to populate a local variable with the value fr...
Operating System - OpenVMS
1752788
Members
6278
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО11-29-2007 09:43 PM
тАО11-29-2007 09:43 PM
How to populate a local variable with the value from a field present in a file.
I have a file X having a numeric variable NUM.
I need the value of NUM to be stored in another local variable .
READY X SHARED
FIND ALL X With NUM=1
[1 record found]
I want this value to be stored in a local variable.
Kindly provide a solution.
Thanks.
I need the value of NUM to be stored in another local variable .
READY X SHARED
FIND ALL X With NUM=1
[1 record found]
I want this value to be stored in a local variable.
Kindly provide a solution.
Thanks.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2007 10:22 PM
тАО11-29-2007 10:22 PM
Re: How to populate a local variable with the value from a field present in a file.
Hello panneer,
Can you provide some information about the environment you are talking about?
Which Operating System? If a Database is involved, what type of Database?
Thanks,
Bart
Can you provide some information about the environment you are talking about?
Which Operating System? If a Database is involved, what type of Database?
Thanks,
Bart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 12:30 AM
тАО11-30-2007 12:30 AM
Re: How to populate a local variable with the value from a field present in a file.
Its a DTR code and Operating system is OPEN VMS.
READY X SHARED
FIND ALL X With NUM=1
[1 record found]
I want this value(in NUM) to be stored in a local variable.
Kindly provide a solution.
READY X SHARED
FIND ALL X With NUM=1
[1 record found]
I want this value(in NUM) to be stored in a local variable.
Kindly provide a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2007 06:08 PM
тАО12-01-2007 06:08 PM
Re: How to populate a local variable with the value from a field present in a file.
Hello,
What programming language are you using to execute these Datatrieve (DTR) commands in OpenVMS? Are you doing this in DCL, BASIC, FORTRAN, or what? Also, do you know what verison of VMS you are on? VAX or Alpha?
I used to do some Datatrieve programming on a MicroVAX some eighteen years ago. I used Fortran to call Datatrieve commands.
Basically, without giving you a complete solution, first you need to setup a RECORD structure, if you're using a programming language, such as FORTRAN. This record structure must match your database layout, or match the ad hoc query from Datatrieve. Your database layout is probably done in CDD (Common Data Dictionary. Then you have to use Datatrieve function calls (something like CALL DTR$CONTEXT(), CALL DTR$FIND()) that sets up a context that will allow you to store the datatrieve output from the FIND command, into your programming language data record structure.
For (FORTRAN) example,
STRUCTURE /dtr_structure/
UNION
MAP
BYTE datatrieve_data(nnnn)
END MAP
MAP
CHARACTER*(nnnn) variable1
INTEGER variable2
REAL variable3
CHARACTER*(mmm) variable4
...
...
END MAP
END UNION
EMD STRUCTURE
RECORD /dtr_structure/ dtr_record
CALL DTR$CONTEXT(dtr_conext)
CALL DTR$FIND(dtr_context,dtr_command,dtr_record)
Or something like that. I don't remember the exact syntax. You might have manuals that explain how to program in DTR and what the correct syntax of DTR function calls are.
Tell you what, if this is the direction you think you need to go, I will try to find some code I have on backup tapes and see if I can find something that will help you out.
DECxchange
What programming language are you using to execute these Datatrieve (DTR) commands in OpenVMS? Are you doing this in DCL, BASIC, FORTRAN, or what? Also, do you know what verison of VMS you are on? VAX or Alpha?
I used to do some Datatrieve programming on a MicroVAX some eighteen years ago. I used Fortran to call Datatrieve commands.
Basically, without giving you a complete solution, first you need to setup a RECORD structure, if you're using a programming language, such as FORTRAN. This record structure must match your database layout, or match the ad hoc query from Datatrieve. Your database layout is probably done in CDD (Common Data Dictionary. Then you have to use Datatrieve function calls (something like CALL DTR$CONTEXT(), CALL DTR$FIND()) that sets up a context that will allow you to store the datatrieve output from the FIND command, into your programming language data record structure.
For (FORTRAN) example,
STRUCTURE /dtr_structure/
UNION
MAP
BYTE datatrieve_data(nnnn)
END MAP
MAP
CHARACTER*(nnnn) variable1
INTEGER variable2
REAL variable3
CHARACTER*(mmm) variable4
...
...
END MAP
END UNION
EMD STRUCTURE
RECORD /dtr_structure/ dtr_record
CALL DTR$CONTEXT(dtr_conext)
CALL DTR$FIND(dtr_context,dtr_command,dtr_record)
Or something like that. I don't remember the exact syntax. You might have manuals that explain how to program in DTR and what the correct syntax of DTR function calls are.
Tell you what, if this is the direction you think you need to go, I will try to find some code I have on backup tapes and see if I can find something that will help you out.
DECxchange
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP