Skip to main content
Thanks Brian, and yeah, I've used the SQL functions over ODBC before, but
it's kind of fiddly to setup. The intent here is to provide something to
bootstrap an inexperienced user in installing some new code and artifacts
that go along with the code. You can type "SQL UPDATE ..." but only after
having setup the account for SQL (I think?). I get "No privilege on file
VOC!" as an error at least.

I was trying to get away from having a basic program, because it's
obviously challenging to a non programmer to understand all the possible
ways compiling and cataloging a program can fail. But installing a utility
like UPDATE.RECORD once and cataloging globally might be the best
compromise option. I can write my own, with a pretty rigid syntax like
"UPDATE.RECORD VOC TEST SET 3=nk jhkjewqh ekjhqwkje jk" since it's not
designed to be used interactively, just used for updating parameters when
installing some new code.

Really appreciate the suggestions!

On Mon, Feb 27, 2023 at 11:49 PM Brian Speirs via Rocket Forum <
Mail@forum.rocketsoftware.com> wrote:

> I recall being told that you can use the U2 SQL functionality to update
> (insert/delete) items in a file. I haven't done it myself, so I can't...
> Invite your colleagues to join the Rocket Forum and grow our expert
> network.
> ------------------------------
> [image: Rocket Software]
> Rocket U2 | UniVerse & UniData
>
> Post New Message Online
>
> Invite your colleagues to join the Rocket Forum and grow our expert
> network. Share this link.
> Re: Update a VOC item from TCL
>
> Reply to Group Online
>
> [image: Brian Speirs]
>
> Feb 28, 2023 2:46 AM
> Brian Speirs
>
>
> I recall being told that you can use the U2 SQL functionality to update
> (insert/delete) items in a file. I haven't done it myself, so I can't
> really guide you. Maybe you have to define the file for SQL usage first -
> or maybe you don't.
>
> Or: QM has this functionality built in. You can find the source code of
> the UPDATE.RECORD command by Googling for it (search for: openqm gpl.bp)
> then look at the UPDREC item in the GPL.BP folder.
>
> Cheers,
>
> Brian
> *Reply to Group Online
> *
> *View Thread
> *
> *Post New Message Online
> *
>
>
Thanks Brian, and yeah, I've used the SQL functions over ODBC before, but
it's kind of fiddly to setup. The intent here is to provide something to
bootstrap an inexperienced user in installing some new code and artifacts
that go along with the code. You can type "SQL UPDATE ..." but only after
having setup the account for SQL (I think?). I get "No privilege on file
VOC!" as an error at least.

I was trying to get away from having a basic program, because it's
obviously challenging to a non programmer to understand all the possible
ways compiling and cataloging a program can fail. But installing a utility
like UPDATE.RECORD once and cataloging globally might be the best
compromise option. I can write my own, with a pretty rigid syntax like
"UPDATE.RECORD VOC TEST SET 3=nk jhkjewqh ekjhqwkje jk" since it's not
designed to be used interactively, just used for updating parameters when
installing some new code.

Really appreciate the suggestions!

On Mon, Feb 27, 2023 at 11:49 PM Brian Speirs via Rocket Forum <
Mail@forum.rocketsoftware.com> wrote:

> I recall being told that you can use the U2 SQL functionality to update
> (insert/delete) items in a file. I haven't done it myself, so I can't...
> Invite your colleagues to join the Rocket Forum and grow our expert
> network.
> ------------------------------
> [image: Rocket Software]
> Rocket U2 | UniVerse & UniData
>
> Post New Message Online
>
> Invite your colleagues to join the Rocket Forum and grow our expert
> network. Share this link.
> Re: Update a VOC item from TCL
>
> Reply to Group Online
>
> [image: Brian Speirs]
>
> Feb 28, 2023 2:46 AM
> Brian Speirs
>
>
> I recall being told that you can use the U2 SQL functionality to update
> (insert/delete) items in a file. I haven't done it myself, so I can't
> really guide you. Maybe you have to define the file for SQL usage first -
> or maybe you don't.
>
> Or: QM has this functionality built in. You can find the source code of
> the UPDATE.RECORD command by Googling for it (search for: openqm gpl.bp)
> then look at the UPDREC item in the GPL.BP folder.
>
> Cheers,
>
> Brian
> *Reply to Group Online
> *
> *View Thread
> *
> *Post New Message Online
> *
>
>
Thanks Gregor, I've used the SQL commands before (though mostly from an
ODBC client). That would definitely work, but they are not directly
available without some configuration (at least in Unidata). In the ud demo
account I can run those commands by prefacing them with "SQL", but it's
sort of an involved process to get setup if I'm remembering correctly. I
was trying to stay away from having the end user (who is not technical) go
through compiling and cataloging a program, but that seems like the path of
least resistance.

Really appreciate the advice, and I never thought about running SQL from
within the environment - that could come in handy some day!


On Tue, Feb 28, 2023 at 3:39 PM Gregor Scott via Rocket Forum <
Mail@forum.rocketsoftware.com> wrote:

> This is quite easy using the SQL command "UPDATE" or "INSERT" commands.
> The following will update the existing VOC item INVOICE.EXTRACTS ...
> Invite your colleagues to join the Rocket Forum and grow our expert
> network.
> ------------------------------
> [image: Rocket Software]
> Rocket U2 | UniVerse & UniData
>
> Post New Message Online
>
> Invite your colleagues to join the Rocket Forum and grow our expert
> network. Share this link.
> Re: Update a VOC item from TCL
>
> Reply to Group Online
>
> [image: Gregor Scott]
>
> Feb 28, 2023 6:19 PM
> Gregor Scott
>
>
> This is quite easy using the SQL command "UPDATE" or "INSERT" commands.
>
> The following will update the existing VOC item INVOICE.EXTRACTS
>
> UPDATE "VOC" SET INV.PATH = '/path/to/invoices' WHERE @ID =
> 'INVOICE.EXTRACTS';
> UPDATE "VOC" SET INV.PATH2 = '/path/to/invoices2' WHERE @ID =
> 'INVOICE.EXTRACTS';
> UPDATE "VOC" SET INV.PATH3 = '/path/to/invoices2' WHERE @ID =
> 'INVOICE.EXTRACTS';
>
> The following will CREATE the VOC item INVOICE.EXTRACTS:
>
> INSERT INTO VOC (@ID, F1, F2, F3, F4) VALUES
> ('INVOICE.EXTRACTS','X','/path/to/
> invoices','/path/to/invoices2','/path/to/invoices3');
>
> This is what the INSERT command produces:
>
> >INSERT INTO VOC (@ID, F1, F2, F3, F4) VALUES
> ('INVOICE.EXTRACTS','X','/path/to/
> invoices','/path/to/invoices2','/path/to/invoices3');
> UniVerse/SQL: 1 record inserted.
> >CT VOC 'INVOICE.EXTRACTS'
>
> INVOICE.EXTRACTS
> 0001 X
> 0002 /path/to/invoices
> 0003 /path/to/invoices2
> 0004 /path/to/invoices3
> >
>
> Both commands are documented in the "SQL Reference" manual.
>
> The hurdle for understanding is that any UV file can be used with these
> commands, not just SQL Tables or Views.
> *Reply to Group Online
> *
> *View Thread
> *
> *Post New Message Online
> *
>
>