Hello,
I found the Repair program for the PO Archive; it is from March 2001.
There are two drawbacks:
- the comments are in German language
- it uses macros to do the linkage conventions
but I guess, it will be easy to modify it to do what you want.
It is short enough so that I can post it into the mail here.
REPAIR CSECT
#COPYR REPAIR
*
*************************************************************
* ANFANGSMAKRO INKL. LINKAGE-KONVENTIONEN
*************************************************************
*
#BEGIN
*
*************************************************************
* EINGABEDATEI OEFFNEN.
*************************************************************
*
OPEN (EING,(INPUT))
OPEN (AUSG,(OUTPUT))
*
MVC MSG1,=CL133' DATEIEN SIND OFFEN'
PUT AUSG,MSG1
*
*************************************************************
* EINGABESATZ EINLESEN UND PRUEFEN
*************************************************************
*
LESEN DS 0H
*
READ READECB,SF,EING,BLOCK,'S'
*
* MVC MSG1,=CL133' READ ERFOLGREICH, WARTEN VIA CHECK'
* PUT AUSG,MSG1
*
B CHECK
*
EOFX DS 0H
*
MVC MSG1,=CL133' NEUES MEMBER STARTET'
PUT AUSG,MSG1
*
B LESEN
*
CHECK DS 0H
*
CHECK READECB
*
* MVC MSG1,=CL133' BLOCK GELESEN'
* PUT AUSG,MSG1
*
PUT AUSG,BLOCK
*
B LESEN
*
*************************************************************
* DATEIENDE, DATEIEN SCHLIESSEN UND RAUS
*************************************************************
*
ENDE DS 0H
*
MVC MSG1,=CL133' DATEIENDE'
PUT AUSG,MSG1
*
CLOSE (EING)
CLOSE (AUSG)
*
#RET RC=0
*
*
*
*************************************************************
* DEFINITIONEN
*************************************************************
*
EING DCB DSORG=PS, *
MACRF=R, *
RECFM=VB, *
DDNAME=EING, *
SYNAD=ENDE, *
EODAD=EOFX
*
AUSG DCB DSORG=PS, *
MACRF=PM, *
RECFM=FBA, *
DDNAME=AUSG, *
LRECL=133
*
MSG1 DS CL133
*
#END
*
BLOCK DS 40000C
*
END REPAIR
In fact, this was only a test program to test the BSAMIO mechanism.
In the end, I wrote a C program which used an ASSEMBLER subprogram
which did BSAM IO calls like the ones I showed above. The C program
copied the members that could still be reached to a new dataset.
Input was done using the BSAM IO macros above, and output was done
using normal C File IO.
int bsamio (int modus, char *iobuffer);
/************************************************/
/* ASSEMBLER-Upro mit Makros OPEN/CLOSE, */
/* READ, CHECK, POINT, NOTE */
/* */
/* DCB mit folgenden Eigenschaften: */
/* DSORG=PO,MACRF=R,DDNAME=EING,RECFM=VB */
/************************************************/
The C program uses this ASSEMBLER subprogram BSAMIO, which
makes the ASSEMBLER macros OPEN, CLOSE, READ, CHECK, POINT
and NOTE available to the C program. The desired macro is chosed by
specifying the first parameter MODUS.
Now I'm not sure, if the C program will be useful for you, and if I'm
allowed
to send it to you due to legal reasons, but I think you get the idea and
will be able to write an ASSEMBLER program of your own.
Kind regards
Bernd
Am 22.03.2013 12:41, schrieb Bernd Oppolzer:
I don't think that I will find it, because the episode was some 15
years ago,
but I'll try ... I'll send you an answer later today.
Am 22.03.2013 10:56, schrieb Ravi Gaur:
Do you have the code of assemble to read the directory sequentially
and create members...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN