- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Need help on datatrieve
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
тАО11-11-2009 04:43 AM
тАО11-11-2009 04:43 AM
Need help on datatrieve
Thanks & Regards,
Vdya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 06:41 AM
тАО11-11-2009 06:41 AM
Re: Need help on datatrieve
After that you need to REdefine.
Typically you get that automatically by using the EDIT command.
Check out DTR> help command REDEFINE_Command
The line "DEFINE PROCEDURE" ended up in the procedure.. remove it.
Free advice:
1) A name like SAMPLE or TEST is prone to be duplicate and confusing.
Consider names like SAMPLE_PROC and SAMPLE_REC
Admittedly that is redundant data.. but it helps keeping sane.
2) As you are learning Datatriece try to avoid FIND as soon as possible. Go for (nested) FOR loops if and when you can.
FOR IMC CROSS INC OVER ITM WITH IDE ...
Or stick the whole lot in the print statement.
Check: DTR> help command cross example
3) If you have further questions, condsider whether you can express them in a YACHTS and OWNERS example. By doing so, we will understand you better and may be able to coble up working examples.
4) When working with RMS INDEXED files, Start datatrieve with $ DATA /DEBUG
By doing so DTR will nicely tell you whether it is using an RMS INDEX.
5) Enjoy! DTR is a fine tool. It was years ahead of its time at its time. Which made is miss the SQL boat.
Good luck!
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2009 06:53 AM
тАО11-11-2009 06:53 AM
Re: Need help on datatrieve
There is nothing "special" you need to do for procedures when using multiple domains.
When you defined SAMPLE did you get the DFN> prompts?
Can you EDIT SAMPLE? If so what happens.
CCSS - Computer Consulting System Services, LLC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2009 02:47 AM
тАО11-12-2009 02:47 AM
Re: Need help on datatrieve
Now its working fine after redefine.
My procedure name is expiry_date_rec.dtr When i execute procedure first time its creating file called expiry_date_prc.dtr.
Later its giving expected output.
I have 2 records for example yacht_rec and owner_rec and domains defined for these records are yacht and owner respectively. Also RMS files are yachts.dat and owners.dat.
Now i have filtered few fields from both records and combining those records using procedure(using cross and over keywords) owner_info.
Now i want to write/store output in new DAT file. For records we can define file using domain name as below
DTR>define file for yacht
DTR>ready yacht write
I hope its correct and will overwrite exisiting dat file.
But how to create dat file and and write output for procedures?
Thanks & Regards,
Vidya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 10:18 PM
тАО11-15-2009 10:18 PM
Re: Need help on datatrieve
Regards,
Vidya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 10:23 PM
тАО11-15-2009 10:23 PM
Re: Need help on datatrieve
DTR> help comm define_file
DTR> FINISH ALL
DTR> DEFINE FILE FOR
DTR> READY
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2009 03:11 AM
тАО11-16-2009 03:11 AM
Re: Need help on datatrieve
For record its
DOMAIN EM USING EMPDEF ON WMS$SEC:EMP.DAT;
where EM domain name, EMPDEF record name and WMS$SEC:EMP.DAT; is complete path for DAT file.
Is there any way to define domain for procedure since i have combined output from 2 different records
Thanks & Regards,
Vidya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2009 04:28 AM
тАО11-16-2009 04:28 AM
Re: Need help on datatrieve
Huh? Language problem!
>> For record its
>> DOMAIN EM USING EMPDEF ON WMS$SEC:EMP.DAT;
That's just 1 domain.
So is that there the desired OUTPUT domain?
Or is that 1 of the 2 inputs?
Or is that 1 domain, used twice for input crossed with itself?
>> Is there any way to define domain for procedure since i have combined output from 2 different records
Do you just want the output from a procedure to go into a file?
Check out DTR> HELP COMMAND ON
or DTR COMMAND PRINT ... and look for ON clause.
You can also combine record from multiple input domains into a single output domain and have the procedure store data in that output.
Three main methods
DEFINE FILE FOR EM;
READY EM EXCLUSIVE WRITE;
EM = IN_1 CROSS IN_2 OVER
or SINGLE loop with CROSS and IF-THEN-ELSEs as needed
DEFINE FILE FOR EM;
READY EM EXCLUSIVE WRITE;
FOR N_1 CROSS IN_2 OVER
STORE EM USING
BEGIN
EM_xxx = IN_yyy...
:
END
or NESTED LOOPS with IF-THEN-ELSEs as needed
FOR DEFINE FILE FOR EM;
READY EM EXCLUSIVE WRITE;
FOR N_1 WHERE ...
BEGIN
:
FOR IN_2 WHERE ...
BEGIN
:
STORE EM USING
BEGIN
EM_xxx = IN_yyy...
:
END
:
END
:
END
Thanks & Regards,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2009 05:16 AM
тАО11-17-2009 05:16 AM
Re: Need help on datatrieve
I just want the output from a procedure to go into a file.
I tried with DTR>print on file_spec
Its working fine. It created specified file and dumped data into that.
>>That's just 1 domain.
>>So is that there the desired OUTPUT domain?
>>Or is that 1 of the 2 inputs?
>>Or is that 1 domain, used twice for input crossed with itself?
Its one of the 2 inputs. There are 2 domains IM and IN.
My procedure looks like
REDEFINE PROCEDURE EXPIRY_REC
READY IM SHARED
READY IN SHARED
FIND IM WITH IDE=70 OR IDE=82
FIND CURRENT CROSS IN OVER ITM
PRINT CURRENT ON EXPIRY_REC.DAT
END_PROCEDURE
Let me try with methods you mentioned.
Thanks & Regards,
Vidya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2009 08:47 AM
тАО11-17-2009 08:47 AM
Re: Need help on datatrieve
>> FIND IM WITH IDE=70 OR IDE=82
>> FIND CURRENT CROSS IN OVER ITM
>> PRINT CURRENT ON EXPIRY_REC.DAT
And that's just fine for modest data volume like 10,000 records or so.
You should be able to do this all in one command:
PRINT IM CROSS IN OVER ITM WITH IDE=70 OR IDE=82 ON EXPIRY_REC.DAT
Collections like 'CURRENT' are convenients, but slow down the results when processing large amounts of records (50,000+ ?).
They make Datatrieve re-read data.
Hein