Computing.Net > Forums > OpenVMS > seperate a file to different file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

seperate a file to different file

Reply to Message Icon

Name: leng
Date: October 25, 2007 at 23:56:32 Pacific
OS: alpha vms
CPU/Ram: 4
Product: hp
Comment:

i am need in vms, i wrote a procobol file which is used to extract data from datawarehouse, the output file will be in DAT format. i need to write a COM file which is use to seperate all the data frm the DAT file based on the scenario and mail to respective person.

logic will be:
1. after generated the DAT file,Search scenario by scenario and output to different files
2.search "scenario1","scenario2","scenario3". ..in DAT file and output to scenario1.dat,scenario2.dat, scenario3.dat...
3. verify whether the scenario1.dat,scenario2.dat, scenario3.dat... had any content by size
4.if had contents, then mail to respective person.
5. loop back again for next scenario until end of the scenario.




Sponsored Link
Ads by Google

Response Number 1
Name: HakZan
Date: October 27, 2007 at 02:23:10 Pacific
Reply:

$ search file.DAT "scenario1" /output=scenario1.lis
$ search file.DAT "scenario2" /output =scenario2.lis
$ search file.DAT "scenario3" /output=scenario3.lis

$ if f$file_attribute("scenario1.lis","ALQ") .gt. 0 then mail/subject="scenario1" scenario1.lis 'mailadress'
and so on.......



0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: seperate a file to different file

how to check if a file exists using www.computing.net/answers/openvms/how-to-check-if-a-file-exists-using/336.html

to write system errors into a file www.computing.net/answers/openvms/to-write-system-errors-into-a-file/324.html

append a file www.computing.net/answers/openvms/append-a-file/196.html