Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

How to embed special, control and function char in DCL Batch Job?

 
RM Martin
Occasional Visitor

How to embed special, control and function char in DCL Batch Job?

Hi,

I'm new to the forum and I'm looking to solve a problem with embedding special characters (*), control, Insert and Function keys (Cntrl C, Cntrl F10), into a batch job. The job logs in to the DCL or an ISE application called, ISE Schedule, the job(s) need to perform an emulation of these key strokes to control some of routines being executed. The termtype the DCL is logging into is a DEC vt420. What would be the best way to accomplish this? Thanks in advance for any ideas you can help with on this request!
9 REPLIES 9
Steven Schweda
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

There are ways to express non-printable
characters in DCL, but it's not clear what
you would be doing with them. Trying to
operate some menu-driven interactive
application which normally deals with a VT
terminal can be difficult to arrange from
any kind of command procedure, whether it's a
batch job or not.

A programming/programmer guide for a VTxxx
could tell you what a real VTxxx transmits
when keys are pressed. (My handy VT220
Programmer Pocket Guide doesn't seem to
suggest anything for a combination like
Ctrl/F10, however. And a DECterm seems to
interpret Ctrl/F10 itself, rather than
passing it along to the application.)

> The termtype the DCL is logging into is a
> DEC vt420.

I don't know what that means.

> What would be the best way to accomplish
> this?

Depending on exactly what you really wish to
do, my guess would be that the best way would
be to use some non-interactive interface,
rather than trying to fake interaction
through an interactive interface.
Hein van den Heuvel
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

Welcome to the OpenVMS Forum!


The answer to your question is easy, but as Steven also suggests, it is unlikely to help you solve the real problem.

Be sure to Google around.
For the application first and OpenVMS secondarely.

In the end you may need a tool like DTM = 'DEC TEST MANAGER' or 'EXPECT' or KERMIT.
Or write dedicated solution perhaps using a PSUEDO TERMINAL (FT driver).
RTFM and check out sys$examples:ALPHA_LOGGER.C
Indeed include those terms in your Google exploit.

http://h71000.www7.hp.com/doc/73final/6136/6136pro_025.html

Now to answer your question:

>> How to embed special, control and function char in DCL Batch Job?

1) You could use an editor, or specialized tool to embed them into text. OpenVMS is very tolerant for that. Then TYPE that text file.

2) As per above but include them in data lines within a DCL procedure.

3) Set up symbols using BIT level assigment and manipulated those in concatenations, and WRITE actions.

Example below.

hth,
Hein


$ esc[0,8]=27
$ write sys$output esc,"[2J",esc,"[H"
$
$ bel[0,8]=7
$ write sys$output bel


Hoff
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

There may be an alternative approach available, rather than trying to do this via the GUI.

Per the ISE documentation...

--
How to enter EnterpriseSCHEDULE Commands

EnterpriseSCHEDULE can be controlled, monitored and administered using commands that are described in the EnterpriseSCHEDULE Reference manual. Nearly all functions that are available in the Windows GUI can be accomplished using commands.EnterpriseSCHEDULE objects (jobs, layouts, calendars etc.) are organized in a two tiered directory structure that is internal to EnterpriseSCHEDULE and is not part of the UNIX directory structure. There are three ways to access the EnterpriseSCHEDULE line command shell.
--
RM Martin
Occasional Visitor

Re: How to embed special, control and function char in DCL Batch Job?

Hein,

I've had moderate success using the editor approach as your example showed. Thanks for the tips. Do you or any others in the forum think that there may be more or less success trying to re-assign the non-printable key functions to printable ones through something like a DEFINE statement? I'm a bit new to VMS (more of a UNIX type -- so, hope this makes sense). Also, The ISE Enterprise Schedule is a Windows PC Application which uses GUI and connects via a virtual terminal connection (vt420), if that helps.

There was also mention of using KERMIT. Can a string of non-printable commands be created, saved and called upon from KERMIT to interface with the ISE Enterprise Schedule App somehow? If so, how would that be accomplished?

Just trying to explore my options. Thanks for any ideas you and the forum can provide.
Steven Schweda
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

> [...] re-assign the non-printable key
> functions to printable ones through
> something like a DEFINE statement?

I don't think that DEFINE does what you might
think it does.

> [...] Can a string of non-printable
> commands be created, saved and called upon
> from KERMIT to interface with the ISE
> Enterprise Schedule App somehow? If so, how
> would that be accomplished?

Bearing in mind that I know nothing about
"the ISE Enterprise Schedule App", or how you
talk to it from where, Kermit offers the
ability to communicate over a serial line (or
Telnet, rlogin, SSH, ... connection), and
then follow a script, where the scripting
language offers some considerable flexibility
(including easy specification of non-printing
ASCII characters).

http://www.columbia.edu/kermit/ckscripts.html

A recent thread on comp.os.vms points to
recent Kermit stuff for VMS in a vaguely
similar context:

http://groups.google.com/group/comp.os.vms/browse_thread/thread/d755da029162fbc8
Hoff
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

Is this ISE GUI interface your target for scripting (and scraping) operating locally on the Microsoft Windows box, and are you attempting to use VMS (somehow) to script (and scrape) this Windows GUI? (This configuration won't work.)

If Unix is your tools preference, then use that. Your chances of scripting a terminal-based display are far better with Unix and particularly with the expect tool. (And that tool targets command-line interfaces, and not GUI scraping.)

It would seem very likely this ISE tool has a command interface, and that would usually be the easiest approach. Either for direct management, or for scraping via expect.

Screen scraping (Windows, Unix, OpenVMS, Mac OS X, Linux, BSD, OS/2, MVS, anywhere) and web scraping are approaches of last resort. And GUI scraping requires platform-specific tools.
Hein van den Heuvel
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

Hmmm I thought Hoff's earlier find about alternative control was promissing.

To continue on the possibly hopeless path to insert control characters and such...

TPU: http://h71000.www7.hp.com/wizard/wiz_5968.html
EDT: http://www.atl.lmco.com/projects/csim/gui/edt/

I also seem to recall a N

Or you could dump a repetoire in a file and copy characters from there.

Here is an example of getting them in a file:

---- ascii.com ---
$ names = "NUL,SOH,STX,ETX,EOT,ENQ,ACK,BEL,BS ,HT ,LF ,VT ,FF ,CR ,SO ,SI ," + -
"DLE,DC1,DC2,DC3,DC4,NAK,SYN,ETB,CAN,EM ,SUB,ESC,FS ,GS ,RS ,US "
$ i = 0
$ line = ""
$loop:
$ c[0,8] = i
$ line = line + c + c + c + " " + F$ELEM(i,",",names) + " "
$ i = i + 1
$ IF i .EQ. 8 * ( i / 8 )
$ THEN
$ write sys$output line
$ line = ""
$ ENDIF
$ IF i .lt. 32 THEN GOTO loop
$
----------

$ @ascii / out=ascii.txt

Verify with DUMP

$ DUMP/RECORD ascii.txt

Verify with the old EDT editor

$ edit/edt tmp.tmp
^@^@^@ NUL ^A^A^A SOH ^B^B^B STX ^C^C^C ETX
^D^D^D EOT ^E^E^E ENQ ^F^F^F ACK ...

Now a plain EDIT ( TPU ) is not too helpful.

fwiw,
Hein
David Phelps
Occasional Advisor

Re: How to embed special, control and function char in DCL Batch Job?

I've tried experimenting with this stricting from DCL. You can write a DCL script from within a DCL script to assign the Ascii codes but you hit a road block because of the terminal type always being zero onside DCL goes withing the "Vendor application software". For example, you can find the actual asci codes on your system by pressing them within an "application" using set-ups like this:

$! --- screen control -------------------
$ SAY == "WRITE SYS$OUTPUT"
$ CLS=" "
$ ESC[0,8] = 27
$ CRLF = F$FAO("!/")
$ CLS = ESC+"[H"+ESC+"[J"
$ F10 = ESC+"[21~"
$ F7 = ESC+"[18~" + "Q"
$ PGUP = "|"+ESC+"[5~"+"|"
$ PGDN = "|"+ESC+"[6~"+"|"
$ UPARRW= "|"+ESC+"[A"+"|"
$ DNARRW= "|"+ESC+"[B"+"|"
$ SAY "F10 = ''F10'"
$ SAY "F7 = ''F7'"
$ SAY "PGUP = ''PGUP'"
$!WAIT 00:00:05
$ SAY "PGDN = ''PGDN'"
$!WAIT 00:00:05
$ SAY "UPARRW = ''UPARRW'"
$!WAIT 00:00:05
$ SAY "DNARRW = ''DNARRW'"

The issue is when you try to incorporate something like the |F10| within the DCL script while its in a "Vendor application",
where the terminal type is always assumed to be "0". so it ignores your DCL command,
such as an |F10|, [F7|Q for F7 & Quit.
Any one ever get around that with just DCL??

VT 420 is a terminal tube serially linked to a VMS box.
ISE Schedule is a third party software
package that intefaces with OpenVMS.

Spend more time working toward your dreams then preserving memories.
Hoff
Honored Contributor

Re: How to embed special, control and function char in DCL Batch Job?

You are using a VT420.

You are using DCL.

You are using an I-S-E scheduling package (possibly the EnterpriseSCHEDULE package) via the GUI interface.

If you are invoking the EnterpriseSCHEDULE application on OpenVMS from within this same DCL command procedure, then DCL is not active, and thus not passing input.

This given you can't run DCL from a VT420 itself, which means you need another path from your DCL or your scripting into the GUI application interface.

With OpenVMS, this path might be a network connection or a serial terminal connection (wrapped around and back at the same host) or it might be a pseudo-terminal connection (which is an internal loopback) to control the target process. More than just DCL is involved here.

Now all that aside, the Windows MS-DOS command interface into the tool would be the best path for scripting the tool. For the general syntax of the command interface available within the I-S-E EnterpriseSCHEDULE package, see the "EnterpriseSCHEDULE command examples" in this document:

http://www.i-s-e.com/pdf/quick_start_VMS.pdf

I expect there's more information on the available commands and options within the associated reference materials.

Based on the following FAQ document, it also appears there is (was?) a schedule command available at DCL:

http://www.xuis.com/Support/FAQs/XS-EnterpriseSCHEDULE_FAQs/xs-enterpriseschedule_faqs.html

And yes, it looks like this is a different organization with the same tool available. (If you poke around, you'll find the ISE logo posted, too.)

Visit or search or call I-S-E folks, and see if they have some DCL Schedule documentation available. Or log into OpenVMS and enter the command, and see if there's online help available.

Failing that command-line path from either the MS DOS command box on Windows or from DCL on VMS, I'd look to use the web path into the tool, as that's somewhat less scraping, and it's easier to scrape and script a web interface as there are some tools available for that. (As opposed to scraping and scripting DCL, which really doesn't have tools.)