KB Article #178409

How to use the synchronous transfer feature from the COBOL API

Problem

How to use the synchronous transfer feature from the COBOL API


COBOL API sample to execute a synchronous transfer



Resolution

The provided sample in SAMPLEO(OAPISYN) can be used for synchronous transfer


//* ---- COBOL ----
//OAPISYN EXEC CFTAPI,PROG=OAPISYN,
// APIP='C=$CFTTCP 10 -s send PART=PARIS,IDF=TXT,IDA=FIL%03d'


Where:
=> C the configuration file
=> CFTTCP the ddname (defined as below)



//CFTTCP DD DISP=SHR,
// DSN=&QUAL..INSTALL($APINS) For synchronous API



10 is the number of transfers

OUTPUT of the test:

>> OAPISYN _ Function COM - C=$CFTTCP;
>> OAPISYN _ Function SEND - PART=PARIS,IDF=TXT,IDA=FIL000;
>> OAPISYN _ Information about transfer
---------------------------
idtu =A0000D7X
idt =B0617494
recblkn=000006699
state =D
sCr =00000
diagi =0
diftyp =N
diagp =
pubRef =



>> OAPISYN _ Function SEND - PART=PARIS,IDF=TXT,IDA=FIL001;
>> OAPISYN _ Information about transfer
---------------------------
idtu =A0000D7Y
idt =B0617495
recblkn=000006700
state =D
sCr =00000
diagi =0
diftyp =N
diagp =
pubRef =