HP3000-L Archives

May 2010, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Keven Miller <[log in to unmask]>
Reply To:
Keven Miller <[log in to unmask]>
Date:
Wed, 26 May 2010 10:06:38 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
----- Original Message ----- 
From: Michael Caplin
To: [log in to unmask]
Sent: Wednesday, May 26, 2010 09:20 AM
Subject: [HP3000-L] BLOCK MODE VARIABLE


I have a subprogram that can be called from a block or character mode main
program and I want the sub to know which called it without anything being
passed in linkage.  I can think of some ugly ways to do it.  Does anyone 
know
of an easy/simple way.
TIA,
mike


[Keven]
1st thought
    Using intrinsics to find out status.
    I haven't found how yet - may not be available.

2nd thought
    Add to main a PUTJCW or SETVAR of the type your in.
    Then the subprogram can FINDJCW or get the var to find out.

3rd thought
    Query the terminal to see if its in block mode.
    I believe its done by requesting the primary terminal status.
        print <escape>^
        read 10 char status WITH timed read (2 sec maybe).
        (timed read incase its not an HPterm -
         and then would not be in block mode -
         2 sec maybe depending on network delays)
        returned status = <esc>\ <7 status bytes>
        byte 3 (0 based) =  bits 12345678
            bit 7  Block mode bit

        (in C,  if status contained the full reply
            char  status [10];
            if (status [5] & 2)  then in block mode)

The words subprogram and linkage tells me your in Cobol.
Keven Miller

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2