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-01-2004 09:51 PM
тАО11-01-2004 09:51 PM
Can you help regarding this batch job to go tp sql and then check/add entries.
The output is as below
$set on
$set verify
$sql
$attach 'filename vms_live;
%SYSTEM-W-NONEXPR, nonexistent process
$set trans read only;
%DCL-W-IVKEYW, unrecognized keyword - check validity and spelling
\TRANS\
Thanx & Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2004 10:21 PM
тАО11-01-2004 10:21 PM
Re: Batch Job
Not sure what command "sql" translates to, but on our RDB VMS machines at work, SQL is invoked by the command, "MCR SQL$" (note the trailing dollar sign).
If you are going to contain SQL statements in a batch job, (attach and set trans) thos lines of code should _not_ contain leading "$", as the DCL interpreter may get confused.
--Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2004 10:23 PM
тАО11-01-2004 10:23 PM
SolutionI dont understand quite well what is your problem. But looking to yours output seems you want to run SQL and then give it some commands.
The wrong thing seems to be the $ at the beginning of $attach 'filename vms_live; and $set trans read only;. The procedure must be something like this:
$set on
$set verify
$sql
attach 'filename vms_live;
set trans read only;
without starting $.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2004 10:51 PM
тАО11-01-2004 10:51 PM
Re: Batch Job
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 02:22 AM
тАО11-02-2004 02:22 AM
Re: Batch Job
How can I pass the parameters of VMS system into SQL ?
Example:If I want to pass the value of F$time() into sql
Script is......
$set noon
$set noverify
$sql
attach 'filename vms_live';
set trans read write;
set out callinglog.txt;
insert into ping_dtl values (
1,'22-OCT-2004 00:00:00.00', 'U', 'CLC_DFN',
'1,CLC_IDN,dC9281','Y','D', 'D', 'D', 'D', 'D', 'Y', 1);
Here I want to pass the parameters of current system time of lexical f$time() in place of '22-OCT-2004 00:00:00' .
How can that be done .
Regards,
HP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 02:29 AM
тАО11-02-2004 02:29 AM
Re: Batch Job
$ open/write O input.tmp
$ write O "attach 'filename vms_live';"
...
$ write O "insert into ping_dtl values (1,'", F$TIME(), "', 'U',...
$ close O
then, run the whole thing:
$ set noon
$ set verify
$ define /user_mode SYS$INPUT input.tmp
$ sql
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 03:06 AM
тАО11-02-2004 03:06 AM
Re: Batch Job
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=726103
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 06:36 PM
тАО11-02-2004 06:36 PM
Re: Batch Job
remember you cannot use twice single quote in your string because this means symbol translation.
For example this sql statement
insert into ... values ('A','');
cannot be written into
$ write o "insert into ... values ('A','');"
You must create a new symbol and use it
$ Q="'"
$ write o
"insert into ... values('A',",Q,Q,");"
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2004 01:19 AM
тАО11-03-2004 01:19 AM
Re: Batch Job
where in the given example of the question did you find any sequence of two single quotes?
To my eyes, and as far as I remember SQL syntax, the single quote after a value is followed by a comma, before the single quote of the next value.
So, no problem there! (although, IF the issue should come to happen, then of course your solution is of course the way to go).
But as far as a sequence of values in an SQL statements is concerned, no need to make it any more complicated then needed.
fwiw,
Cheers.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2004 01:35 AM
тАО11-03-2004 01:35 AM