HP3000-L Archives

November 1998, 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:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Fri, 27 Nov 1998 11:46:29 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (83 lines)
Re:

> Can anybody help me find out how, or if  a procedure on an XL can
> determine the entry point name that the calling program was run with ?
>
> Ie.,   RUN  APROGRAM,ENTRY1;XL="MYXL"
>          RUN APROGRAM,ENTRY2;XL="MYXL"

I can think of a couple of obscure ways, but I'm not sure they're worth
it.
   1) a ":SHOWPROC" command, with the output captured, might show you
      the entry point:


      QPRI  CPUTIME   STATE  JOBNUM  PIN  (PROGRAM) STEP

      C152  0:00.641  WAIT   S325    124  :RUN t.pub,fred;debug
      C152  0:01.049  READY  S325      86   (T.PUB.SIELER)

      But...that won't work in many cases.

   2) <plug> Use SHOT (version 2.21 or later) from Lund Performance Solutions

      SHOT [2.21] - LPS Toolbox [A.03c]     (c) 1995 Lund Performance Solutions
      ...
      SHOT [Delta]: adm + entry
      SHOT [Delta]:
      SHOT @ FRI, NOV 27, 1998…à11:42 AM

      PIN  CPU   Process Name          Pri Q Delta  %  Ic       Entry    Wait State
      --- ------ ------------------------- --- - ----- --- ------------- ------------------
      ..
       26  51174 cm: MESSENGER         120 B     1     cn                IO, TIMER, MESSAGE
       31 453969 NMCONSOL.PUB.SYS      149 B     1     Nn     $168.1b176 MsgPort#-203
       51   1078 T.PUB.SIELER          152 C    11     Nn      $65c.5043 TERMINAL_READ_WAIT
      114   1083 T.PUB.SIELER          152 C    13     Nn      $65c.505f TERMINAL_READ_WAIT

      Summary:                Last 8.7 secs Since SHOT start  Since bootup
                              ------------- ----------------  ------------
      CPU % busy                          1                -             -
      Code Page faults/sec              1.1              1.0             -
      Data Page faults/sec               .1               .1             -
      # Processes started                 0                0         22482
      Process Creates/min                .0               .0            .5


   Note the two different entry points for T.PUB.SIELER.


> Bonus question : Is there any way  Cobol programs can specify
> secondary entry points ?

Wow...Joe struck out, but I figured it out!  I'm chortling, because
for over 20 years, I've refused to answer if someone asks me "do you
know how to program in COBOL"! :)

Example:
    ...

 PROCEDURE DIVISION.

 PROC SECTION 1.
 PROC-PARA.

   display "main entry".
   move "main entry" to myentry.

   if i not equal i
 entry "fred"
      move "fred" to myentry
      display "fred".

   display "my entry = ", myentry.


When compiled & run with ",FRED", the "main entry" line isn't executed.

As for the "if i not equal i"?  Heck...I don't know how to say
   "if false then" in COBOL...COBOL doesn't seem to know the word "false" :)


Stan Sieler

ATOM RSS1 RSS2