Loading ...
Sorry, an error occurred while loading the content.

CCW

Expand Messages
  • kerravon86
    What do I need to do modify this code to get the return code to be what is advertised? ie I want it to return the length of the block read. The example code
    Message 1 of 54 , Sep 2, 2010
    • 0 Attachment
      What do I need to do modify this code to get the
      return code to be what is advertised?

      ie I want it to return the length of the block
      read.

      The example code I've looked at so far doesn't
      seem to need to check that.

      Thanks. Paul.




      http://pdos.cvs.sourceforge.net/viewvc/pdos/pdos/s370/pdossup.asm?view=markup

      **********************************************************************
      * *
      * RDBLOCK - read a block from disk *
      * *
      * parameter 1 = device *
      * parameter 2 = cylinder *
      * parameter 3 = head *
      * parameter 4 = record *
      * parameter 5 = buffer *
      * parameter 6 = size of buffer *
      * *
      * return = length of data read, or -1 on error *
      * *
      **********************************************************************
      ENTRY RDBLOCK
      RDBLOCK DS 0H
      SAVE (14,12),,RDBLOCK
      LR R12,R15
      USING RDBLOCK,R12
      USING PSA,R0
      *
      L R10,0(R1) Device number
      L R2,4(R1) Cylinder
      STCM R2,B'0011',CC1
      STCM R2,B'0011',CC2
      L R2,8(R1) Head
      STCM R2,B'0011',HH1
      STCM R2,B'0011',HH2
      L R2,12(R1) Record
      STC R2,R
      L R2,16(R1) Buffer
      STCM R2,B'0111',LOADCCW+1 This requires BTL buffer
      *
      * Interrupt needs to point to CONT now. Again, I would hope for
      * something more sophisticated in PDOS than this continual
      * initialization.
      *
      MVC FLCINPSW(8),NEWIO
      * R3 points to CCW chain
      LA R3,SEEK
      ST R3,FLCCAW Store in CAW
      *
      *
      AIF ('&SYS' EQ 'S390').SIO31B
      SIO 0(R10)
      AGO .SIO24B
      .SIO31B ANOP
      LR R1,R10 R1 needs to contain subchannel
      LA R9,IRB
      TSCH 0(R9) Clear pending interrupts
      LA R10,ORB
      SSCH 0(R10)
      .SIO24B ANOP
      *
      *
      LPSW WAITNOER Wait for an interrupt
      DC H'0'
      CONT DS 0H Interrupt will automatically come here
      LA R15,0
      RETURN (14,12),RC=(15)
      LTORG
      *
      *
      AIF ('&SYS' NE 'S390').NOT390B
      DS 0F
      IRB DS 24F
      ORB DS 0F
      DC F'0'
      DC X'0000FF00' Logical-Path Mask (enable all?)
      DC A(SEEK)
      DC 5F'0'
      .NOT390B ANOP
      *
      *
      DS 0D
      SEEK CCW 7,BBCCHH,X'40',6
      SEARCH CCW X'31',CCHHR,X'40',5
      CCW 8,SEARCH,0,0
      LOADCCW CCW 6,0,X'20',32767
      DS 0H
      BBCCHH DC X'000000000000'
      ORG *-4
      CC1 DS CL2
      HH1 DS CL2
      CCHHR DC X'0000000005'
      ORG *-5
      CC2 DS CL2
      HH2 DS CL2
      R DS C
      DS 0D
      WAITNOER DC X'020E0000' I/O, machine check, EC, wait
      DC X'00000000' no error
      NEWIO DC X'000C0000' machine check, EC
      AIF ('&SYS' EQ 'S370').MOD24
      DC A(X'80000000'+CONT) continuation after I/O request
      AGO .MOD31
      .MOD24 ANOP
      DC A(CONT) continuation after I/O request
      .MOD31 ANOP
      *
      DROP ,
    • kerravon86
      ... Because it s easier to change PC emulator software than change physical terminals, especially if no-one even manufactures 3215s anymore. ... Ok, that s
      Message 54 of 54 , Sep 27, 2010
      • 0 Attachment
        --- In hercules-os380@yahoogroups.com, Tony Harminc <tharminc@...> wrote:
        >
        > > Do real machines use real 3270 consoles these
        > > days or do they use PC emulators?
        >
        > Why is that relevant to anything you plan to do?

        Because it's easier to change PC emulator software
        than change physical terminals, especially if no-one
        even manufactures 3215s anymore.

        > > If they are using PC emulators, do they have 3215
        > > emulators available?
        >
        > The question says "conceptual misunderstanding" to me. It's not a
        > matter of whether they have a 3215 emulator; that's
        > a misunderstanding
        > of what a 3270 emulator is emulating. When we talk
        > of a 3270 emulator,
        > what we usually mean is a program that supports a (typically) PC
        > screen and keyboard on the user end, and the TN3270 protocol
        > on TCP/IP
        > on the other. (There were indeed emulators that talked PC screen and
        > keyboard on the user end, and talked to special hardware that looked
        > like a real coax-connected 3270 on the other, but those
        > are long gone,
        > except occasionally on eBay.)

        Ok, that's what I remember.

        > For a 3215 emulator to make sense, it would have to
        > support the PC (or
        > Blackberry or iPad or whatever) on the user end,

        A terminal emulator like Telix 3.15? Windows
        comes/used to come with one too. Can't remember
        if it supported zmodem, but it would have at
        least supported xmodem.

        > but what would it
        > support on the other end? There is no TN3215 protocol defined.

        If the coax is long gone, then it would have to
        be TCP/IP on the other end. Across that, the
        protocol I would expect would be "line mode
        terminal". The sort of thing recognized by
        Telix 3.15. I think Telix's default was "ANSI",
        whatever that was. It allowed escape characters
        that could position the cursor on the screen etc.

        I don't care if it doesn't support all those
        characters. So long as it recognizes the characters
        on the US keyboard, plus the newline character,
        that should be fine.

        Hmmmm. Maybe it doesn't need the newline character.

        > The real hardware has not supported real 3215s or similar devices
        > (1052 etc.) for many years,

        Ok.

        > and z/OS doesn't have software support for
        > them either.

        I don't care about z/OS. This is PDOS.

        > So even if you invent a TN3215 protocol, how would it be
        > presented to the app running on the hardware?

        App? You mean OS? ie PDOS? Not sure about
        "present", but without question, PDOS is doing
        a CCW with command code x'09'. This is documented
        in my pink booklet page 34 as "write, auto carrier
        return".

        In English, that means "magic".

        I don't know what happens after I pass off the
        CCW. I don't know whether VTAM, BTAM, channel
        programs, interrupts, bisync, TCP/IP gets
        invoked. But I would have hoped that the logic
        to automatically add a carriage return would
        not be too onerous such that someone, somewhere
        can figure out how to add one. If people have
        figured out how to get a 3270 data stream from
        MVS/XA to an emulator not like Telix, I suspect
        that they can figure out how to get a much
        simpler data stream from PDOS/390 to an emulator
        like Telix.

        Don't ask me how many characters I can send in
        the x'09'. That's the sort of thing I just throw
        open to the internet and see what blows up.

        You can call it protocol-9 if you want. IBM
        appears to have invented it, if that makes it
        more appealing than ANSI.

        BFN. Paul.
      Your message has been successfully submitted and would be delivered to recipients shortly.