× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Perhaps you happen to have an exact multiple of 80? I wonder if you divide by 80, and, if there is a remainder, add 1 to the iterations?

Another choice would be to test the string and only write the record if the string is greater than blanks?



Ala, Michael A wrote:
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.