Trimming the old posts because this list has a limit on email size.

What happens if on EOF you open the card reader again and issue another GET?

Do you re-read the same data, or do you read the next set of cards?

That is, given

AAAAAAAAA
BBBBBBBBBB
/*
CCCCCCCCCC
DDDDDDDDDD
/*

Does the second OPEN and GET give you AAAAAAAAAA, CCCCCCCCCC, or an error?

If the latter then you have a workaround, but (a.) you are going to have to 
insert a /* record every time you get end of file and (b.) you are going to 
lose any data in columns 4 through 128, which is probably very much less than 
ideal.

Charles

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Charles Mills
Sent: Friday, December 12, 2025 4:18 PM
To: [email protected]
Subject: Re: Reading Past /* on SYSRDR/SYSIPT

@David, do you have any indication that this is in fact possible? That is, do 
you have any examples of existing programs that do this successfully? Not 
necessarily that you have source code for, just any programs that do this so 
that you can say "I know this is possible because XXXXX does it"?

If not I worry that this is perhaps an impossible quest.

Charles

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Charles Mills
Sent: Friday, December 12, 2025 3:40 PM
To: [email protected]
Subject: Re: Reading Past /* on SYSRDR/SYSIPT

FWIW, Google AI sez

In IBM VSE, trying to read a sequential file (like a card reader input stream) 
past the end-of-file (EOF) marker will result in an error or an exception. You 
cannot "read past EOF" in the conventional sense of retrieving more data, 
because no more data exists. The standard approach is to detect the EOF 
condition and stop reading.

I recall doing something like this but it was literally 50 years ago.

The problem is complicated because there is no real card reader (I assume :-/). 
When I did it there was a real 2540, but the program was actually reading from 
POWER, not from the card reader. That ship had already sailed.

I have no experience with VSE in the post-card-reader era. How do you submit 
the job? From CMS via a virtual card reader under VM?

Does DTFCP still exist? It was a badly-kept IBM secret that gave you DTF 
device-independence, and more flexibility than any of the supported DTFxx 
macros.

Charles

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of David Clark
Sent: Friday, December 12, 2025 1:52 PM
To: [email protected]
Subject: Re: Reading Past /* on SYSRDR/SYSIPT

 Sorry, hit send too soon.  Anyway...  I coded it as follows--removing 
full-line comments, etc.  Still looking for hints.  Thanks.

CARDASM  HEADER VERSION='1.0',AUTHOR='DLC',DATE='(C)DEC25',            X
               BASE=10,SVAREA=SAVEAREA
         OPEN  CARDIN,LINEOUT      OPEN SEQUENTIAL DTFS
GETCARD  DS    0H
         GET   CARDIN              GET A CARD
         IF    =C'/&&',(EQ,CLC),CARD_IA,BC,ENDIN  IF END OF JOB
         ENDIF                                     JUST IN CASE...
         IF    =C'/+',(EQ,CLC),CARD_IA,BC,ENDIN  CUSTOM END-OF-DATA
         ENDIF
DATAIN   DS    0H                  PROCESS INPUT CARDS
         MVC   LINEDATA,CARD_IA    SEND INPUT CARD
         PUT   LINEOUT               TO OUTPUT DEVICE
         J     GETCARD             GO GET ANOTHER CARD
DATAERR  DS    0H                  PROCESS ERROR CARDS
         MVC   CARD_IA,0(R1)       GET ERROR CARD
         J     DATAIN              GO PROCESS IT
ENDIN    DS    0H
         CLOSE CARDIN,LINEOUT      CLOSE SEQUENTIAL DTFS
         XR    R15,R15             ZERO RETURN CODE
EXIT     DS    0H                  PROGRAM EXIT
         TRAILER RETCODE=R15,SVAREA=SAVEAREA
*
STORAGE  DS    0D
SAVEAREA DS    9D
CARD_IA  DS    CL128
LINE_OA  DS    CL121
LINE_CC  DC    C' '
LINEDATA DC    CL120' '
         LTORG
CARDIN   DTFCD DEVADDR=SYSRDR,DEVICE=3505,IOAREA1=CARD_IA,BLKSIZE=128, X
               ERROPT=IGNORE,EOFADDR=DATAERR LINEOUT  DTFDI 
DEVADDR=SYSLST,IOAREA1=LINE_OA,RECSIZE=121

Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331


On Fri, Dec 12, 2025 at 4:12 PM David Clark <[email protected]> wrote:

> OK, I made an attempt, but got the following.  I coded it so I didn't 
> have to test for EOF--meaning, I used a separate piece of code to 
> handle the normal EOF but attempted to process the error card as 
> usual.  (At this point, I'm just trying to print out every card and 
> error card that I read
> in.)  I still need some hints/tips about trying to read past the /* card.
> Thanks.
>
> BG 0000 // JOB    CARDASM   TEST OF READING PAST /* EOD-OF-DATA CARD
> 16:07:39
>         DATE 12/12/2025, CLOCK 16/07/39
>  16:07:39
> BG 0001 1R30I  INVALID CCW - CCB ADDR=X'5002B8' XXCRDIN 44953, X'FEE'
> RC=0002,
>          PARTITION BG
>  16:07:39
> BG 0001 1R30I  CCB=00002005 00200003 00501090 00000000, ADDR=005002B8, 
> BG
>
> BG 0001 1R30I  CCW=00500161 20000078, ADDR=00501090, BG
>  16:07:39
> BG 0000 0P73I I/O ERROR
>  16:07:39
> BG 0000 0S00I JOB CARDASM  CANCELED
>  16:07:39
> BG 0000 0S07I PROBLEM PROGRAM  PSW = 071D1000 00117BDA
> 16:07:39
> BG 0000 0S29I DUMP STARTED
> 16:07:39
> BG 0000 0S30I DUMP STARTED. MEMBER=DBG00772.DUMP IN 
> SUBLIB=SYSDUMP.SUBLIB
>
> BG 0000 1I51I DUMP COMPLETE
>  16:07:39
> BG 0000 1S78I  JOB TERMINATED DUE TO  PROGRAM ABEND
>  16:07:39
> BG 0000 EOJ CARDASM   MAX.RETURN CODE=0016
> 16:07:39
>         DATE 12/12/2025, CLOCK 16/07/39, DURATION   00/00/00
> 16:07:39
>
> Sincerely,
>
> Dave Clark
> --
> int.ext: 91078
> direct: (937) 531-6378
> home: (937) 751-3300
>
> Winsupply Group Services
> 3110 Kettering Boulevard
> Dayton, Ohio  45439  USA
> (937) 294-5331

Reply via email to