|
I have a program parses a record into 80 byte blocks for EDI processing
The problem is I get a blank record in the 80 byte file
Any ideas
FEDIFTPIFS IF F32766 DISK
FEDIINBOX O A F 80 DISK
D Field S 32766 Varying
Bit Stream In
D EDIREC DS 80 INZ
D EDIField 1 80A
D StrSbs S 4S 0 INZ(0001)
Start Substring
D EndSbs S 4S 0 INZ(0080)
End Substring
D RecordLen S 4S 0
D Iterations S 3S 0 INZ(0)
# of Iterations
D ix S 3S 0 INZ(0)
# of Iterations
IEDIFTPIFS NS 01
I 132766 Record
/free
// Read All of the FTP Records Break into 80 Char Bytes
// and Wite out EDI Order File
Dow not (%eof);
READ EDIFTPIFS;
if not (%eof);
RecordLen = %LEN(%TRIM(RECORD));
Iterations = (RecordLen/80) + 1;
StrSbs = 1;
EndSbs = 80;
for ix = 1 to Iterations;
EDIREC = ' ';
EDIREC = %SUBST(Record: StrSbs: EndSbs);
Write EDIINBOX EDIREC;
StrSbs=EndSbs+1;
EndSbs=EndSbs+80;
endfor;
endif; // not eof
enddo; // Read of BRPPO
// End of Program
*inlr = *on ;
return ;
/end-free
OEDIINBOX DADD
Thanks
Michael Ala
EDI Service Line Leader
BP Lubricants USA Inc.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.