🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Nestor Martinez Mon, 08 May 1989 20:12
PL1 to FORTRAN record structure
#954
Author: Nestor Martinez
Date: Mon, 08 May 1989 20:12
71 lines
2517 bytes
I need to read a file with a FORTRAN program but I've the record structure
description as a PL/1 declaration as follows:

DCL 1 STRUC,
	 2 KEYWORD   CHAR(18),             1 - 18
     2 N         FIXED BIN(15),       19 - 20
     2 TEXT      CHAR(50),            21 - 70
     2 SY        FIXED BIN(15),       71 - 72
     2 SP        FIXED BIN(15),       73 - 74
     2 EY        FIXED BIN(15),       75 - 76
     2 EP        FIXED BIN(15),       77 - 78
     2 #VAL      FIXED BIN(15),       79 - 80
     2 BY        FIXED BIN(15),       81 - 82
     2 OPY       FIXED BIN(15),       83 - 84
     2 RESERVED  CHAR(4),             85 - 88
     2 UPDT      FIXED BIN(31),       89 - 92
     2 VALS(N)   FLOAT DEC(6),        93 - 
     2 FLGS(N)   CHAR(1);                -

This is a variable format record where the two last fields occurs N times
(N is the second file in the same structure).

Does anyone help me to translate it in a FORTRAN structure?

The main problem is for the types

     FIXED BIN(15)  -----> INTEGER*2  ??????
     FLOAT DEC(6)   -----> ??????

I've also other PL/1 record structure with its corresponding FORTRAN
equivalence:

DCL 1 REC40,
      2 VALUE      FLOAT BIN(53),
      2 QUANT      FLOAT BIN(53),
      2 PARTNER    CHAR(5),
      2 DIRECT     CHAR(1),
      2 SITC       CHAR(5),
      2 REPORTER,
        3 REPREG   CHAR(2),
        3 REPCNT   CHAR(3),
      2 PERIOD,
        3 YEAR     CHAR(2),
        3 QTER     CHAR(1),
      2 SIGNALS,
        3 QTYCOD   CHAR(1),
        3 USER     CHAR(4);

REAL*8        VALUE
REAL*8        QUANTITY
CHARACTER*5   PARTNER
CHARACTER*1   DIRECTION
CHARACTER*5   SITCCODE
CHARACTER*2   FILLER1
CHARACTER*3   REPORTER
CHARACTER*2   YEAR
CHARACTER*1   PERIOD
CHARACTER*1   QUANTCODE
CHARACTER*4   USERAREA

Is it correct?

Please respond at my e-mail address:

      ...!{uunet,utai,pyramid}!atina!mrecvax!nestor
          nestor@mrecvax.MREC.AR
          nestor@mrecax.UUCP

Thanks in advance.

Nestor M. Martinez
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads