HP3000-L Archives

May 2001, Week 5

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:
Peter Osborne <[log in to unmask]>
Reply To:
Date:
Wed, 30 May 2001 10:52:17 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (84 lines)
Hello All,

We have a (Cobol) program that runs another program (using the
HPCICOMMAND intrinsic) and picks up the output files & uses it.
We are having problems with the program as it seems to pick up
the output to early and it is truncated. So in attempt to solve this
problem, we are trying to see how many accessors are using the
program being called. This works only because our Cobol program
is the only process that will call the second program. When the
second program is no longer being accessed, we know it's ok to
go ahead and use the output. To do this we are trying to use the
FLABELINFO intrinsic but we are getting odd results from it.
Below is the code & corresponding output.

Following is the codes:

01  PRGRM                PIC X(15) VALUE "MYPROG.PUB.TEST".
01  LABEL-MODE          PIC S9(4) COMP VALUE 2.
01  FITEMS.
      03  IFILE-NAME        PIC S9(4) COMP VALUE 1.
      03  IFILE-GROUP      PIC S9(4) COMP VALUE 2.
      03  IFILE-ACCT         PIC S9(4) COMP VALUE 3.
      03  IFILE-ACCESS    PIC S9(4) COMP VALUE 61.

 01  FVALUES.
      03  FLABEL-NAME   PIC X(08).
      03  FILE-GROUP      PIC X(08).
      03  FILE-ACCT         PIC X(08).
      03  ACCESS-NUM    PIC S9(4) COMP VALUE 0.

 01  FIERRORS.
      03  FIERROR OCCURS 4 TIMES PIC S9(4) COMP VALUE 0.

01  ERRCODE              PIC S9(4) COMP VALUE 0.
01  MSGLEN                PIC S9(4) COMP VALUE 36.
01  INFO-LINE              PIC X(79) VALUE SPACES.
                            .
                            .
                            .
                            .
                 CALL INTRINSIC "FLABELINFO" USING PRGRM-FILE,
                                                                            LABEL-MODE,
                                                                            ERRCODE,
                                                                            FITEMS, FVALUES, FIERRORS.
                IF ERRCODE NOT = 0
                    DISPLAY "FILELABELINFO failed, ERROR : ", ERRCODE
                    PERFORM FCHECK-ERROR THRU FE-END
                    IF ERRCODE = -1
                        DISPLAY "ITEM 1 ", FLABEL-NAME, " ERROR: ", FIERROR (1)
                        DISPLAY "         2 ", FILE-GROUP,    " ERROR: ", FIERROR (2)
                        DISPLAY "         3 ", FILE-ACCT,       " ERROR: ", FIERROR (3)
                        DISPLAY "         4 ", ACCESS-NUM, " ERROR: ", FIERROR (4).
                            .
                            .
                            .
                            .
     FCHECK-ERROR.
                CALL INTRINSIC "FERRMSG" USING ERRCODE, INFO-LINE, MSGLEN.
                DISPLAY INFO-LINE.
     FE-END.
               EXIT.

The output display as follows:

            FILELABEL failed, ERROR : -0001
            UNDEFINED FILE SYSTEM ERROR
            ITEM 1    MYPROG       ERROR :  +0000
                      2    PUB                ERROR :  +0000
                      3    TEST              ERROR :  +0000
                      4    +0000             ERROR :  +0000

From the above output surely item 4 is an error since the file
is accessed by other sessions. It should show the number
of accessors rather than a 0.

Does anyone have any ideas for us?

Thanks,
Peter Osborne
Carleton Technologies

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

ATOM RSS1 RSS2