Hi people, I need some help.<br>
How can I write records ending in x"0D0A" instead of x"0D0D0A". I have trouble in reading these records.<br>
Thanks in advance.
gbr,<br>
<br>
What platform and release are you using? If you can post your code here, I'll take a look at it.<br>
<br>
<br>
Matt Dean<br>
dean@deskware.com
Dear Matt,<br>
Excuse me for the time it took me to answer you.<br>
The plataforms I am using are Windows 95(b) and Windows 98.<br>
Here is the code, and thanks for your time.<br>
Gustavo Barreto<br>
---------------<br>
IDENTIFICATION DIVISION.<br>
PROGRAM-ID. VISANET.CBL<br>
AUTHOR. gbr.<br>
ENVIRONMENT DIVISION.<br>
DATA DIVISION.<br>
FILE SECTION.<br>
FD a:\VisaNet2.txt RECORD IS 128 BYTES. <br>
FD a:\VisaNet1.txt RECORD IS 128 BYTES.<br>
WORKING-STORAGE SECTION.<br>
1 VN2.<br>
3 regtipo2 PIC X(1) VALUE "1".<br>
3 cabnum2 PIC 9(7) VALUE 0.<br>
3 comnum2 PIC 9(8) VALUE 2009043.<br>
3 comsuc2 PIC 9(4) VALUE 99.<br>
3 fechalot2 PIC 9(8) VALUE 0.<br>
3 mon2 PIC 9(4) VALUE 840.<br>
3 cantcuot2 PIC 9(2) VALUE 1.<br>
3 planven2 PIC 9(4) VALUE 1.<br>
3 trantipo2 PIC 9(2) VALUE 5.<br>
3 tottran2 PIC 9(7) VALUE 0.<br>
3 totimp2 PIC 9(15) VALUE 0.<br>
3 resto2 PIC X(66) VALUE " ".<br>
1 VN2T.<br>
3 regtipo2t PIC X(1) VALUE "T".<br>
3 comnum2t PIC 9(8) VALUE 2009043.<br>
3 comsuc2t PIC 9(3) VALUE 99.<br>
3 fechaarc2t PIC 9(8) VALUE 0.<br>
3 fechaseq2t PIC 9(8) VALUE 0.<br>
3 tot85812t PIC 9(7) VALUE 0.<br>
3 tot85822t PIC 9(15) VALUE 0.<br>
3 tot85832t PIC 9(15) VALUE 0.<br>
3 tottran2t PIC 9(7) VALUE 0.<br>
3 totimp2t PIC 9(15) VALUE 0.<br>
3 tot062t PIC 9(15) VALUE 0.<br>
3 arctipo2t PIC X(10) VALUE "NORMAL".<br>
3 resto2t PIC X(16) VALUE " ".<br>
1 VN1.<br>
3 regtipo1 PIC X(1) VALUE "1".<br>
3 cabnum1 PIC 9(7) VALUE 0.<br>
3 trannum1 PIC 9(7) VALUE 1.<br>
3 comnum1 PIC 9(8) VALUE 2009043.<br>
3 comsuc1 PIC 9(3) VALUE 99.<br>
3 fechalot1 PIC 9(8) VALUE 0.<br>
3 mon1 PIC 9(4) VALUE 840.<br>
3 cantcuot1 PIC 9(2) VALUE 1.<br>
3 planven1 PIC 9(4) VALUE 1.<br>
3 trantipo1 PIC 9(2) VALUE 5.<br>
3 tarjnum1 PIC X(19) VALUE "*".<br>
3 tarjvenc1 PIC 9(4) VALUE 0.<br>
3 tranfecha1 PIC 9(8) VALUE 0.<br>
3 imp1 PIC 9(15) VALUE 0.<br>
3 autnum1 PIC X(6) VALUE " ".<br>
3 per1 PIC X(6) VALUE " ".<br>
3 resto1 PIC X(24) VALUE " ".<br>
1 eod PIC X(1) VALUE "*".<br>
1 eodsw PIC X(1) VALUE "*".<br>
PROCEDURE DIVISION.<br>
CALL "cls".<br>
DISPLAY "**** NO OLVIDAR DE PONER UN DISQUETTE EN LA UNIDAD ****".<br>
DISPLAY "".<br>
DISPLAY "Ingreso de datos y grabaci¢n del disquette para VISA".<br>
DISPLAY "----------------------------------------------------".<br>
ACCEPT cabnum2 FROM KEYBOARD PROMPT " N§ de cabezal: ".<br>
DISPLAY " Fecha del lote".<br>
ACCEPT fechalot2 FROM KEYBOARD PROMPT " aaaammdd: ".<br>
MOVE cabnum2 TO cabnum1.<br>
MOVE fechalot2 TO fechalot1.<br>
OPEN a:\VisaNet1.txt FOR WRITING.<br>
MOVE 0 to trannum1.<br>
MOVE "N" TO eod.<br>
PERFORM GRABA-1 UNTIL eod = "S".<br>
CLOSE a:\VisaNet1.txt.<br>
OPEN a:\VisaNet2.txt FOR WRITING.<br>
WRITE VN2 TO a:\VisaNet2.txt<br>
WRITE VN2T TO a:\VisaNet2.txt<br>
CLOSE a:\VisaNet2.txt.<br>
CALL "copy /v/y a:\VisaNet?.txt p:\visanet>nul".<br>
STOP RUN.<br>
GRABA-1.<br>
DISPLAY " --------------------------".<br>
ADD 1 to trannum1.<br>
DISPLAY " N§ de transacci¢n: " trannum1.<br>
DISPLAY " Moneda: " mon1 " - U$S".<br>
DISPLAY " Cantidad de cuotas: " cantcuot1 " - Contado".<br>
DISPLAY " Plan de venta: " planven1 " - Transacciones Contado".<br>
DISPLAY " Tipo de transacci¢n: " trantipo1 " - Compra".<br>
ACCEPT tarjnum1 FROM KEYBOARD PROMPT " N§ de tarjeta: ".<br>
DISPLAY " Vencimiento tarjeta".<br>
ACCEPT tarjvenc1 FROM KEYBOARD PROMPT " aamm: ".<br>
DISPLAY " Fecha de transacci¢n".<br>
ACCEPT tranfecha1 FROM KEYBOARD PROMPT " aaaammdd: ".<br>
DISPLAY " Importe".<br>
ACCEPT imp1 FROM KEYBOARD PROMPT " contar con 2 decimales: ".<br>
ACCEPT autnum1 FROM KEYBOARD PROMPT " N§ de autorizaci¢n: ".<br>
WRITE VN1 TO a:\VisaNet1.txt<br>
ADD 1 TO tottran2.<br>
ADD imp1 TO totimp2.<br>
ADD 1 TO tottran2t.<br>
ADD imp1 TO totimp2t.<br>
MOVE "N" TO eodsw.<br>
PERFORM ACCEPT-EOD UNTIL eodsw = "S".<br>
ACCEPT-EOD.<br>
DISPLAY "".<br>
ACCEPT eod FROM KEYBOARD PROMPT " ¨Otra transacci¢n? [sn]: ".<br>
DISPLAY "".<br>
IF eod = "s" THEN<br>
MOVE "N" TO eod<br>
MOVE "S" TO eodsw<br>
ELSE<br>
IF eod = "S" THEN<br>
MOVE "N" TO eod<br>
MOVE "S" TO eodsw<br>
ELSE<br>
IF eod = "n" THEN<br>
MOVE "S" TO eod<br>
MOVE "S" TO eodsw<br>
ELSE<br>
IF eod = "N" THEN<br>
MOVE "S" TO eod<br>
MOVE "S" TO eodsw<br>
ENDIF<br>
ENDIF<br>
ENDIF<br>
ENDIF.<br>
------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.