× 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.



On Fri, 04 Dec 1998 15:39:49 -0500, Chuck Lewis <CLEWIS@IQUEST.NET> wrote:

>What I need to do is print labels. Simple enough. I need to print them 4
>across.
>
>The program needs to read the file, put info on "Label 1", read again
>and put info on "Label 2", read again and put info on "Label 3", read
>again and put info on "Label 4". THEN writes Detail... Go to next 4,
>etc...
>
>I've tried counters, etc. and am either completely brain dead today or I
>don't know what but I can get NOTHING to work...
>
>Anyone have an example of this ?

I did this at my previous job, but don't have the code at hand, but this
should be close. This is unformatted code, but should make sense.

Let's see:

* assume printer dds (I've forgotten O specs)
* file contains name, address, city, state, zip fields
* user controls execution (not cycle code)
* assuming each label can have 30 chars across
* assuming you want to print 4 lines per label

f somefile if e k disk
f prtfile o e printer
d line1 s 30 dim(4)
d line2 s 30 dim(4)
d line3 s 30 dim(4)
d line4 s 30 dim(4)
d x s 1 0 inz(1)
c read file 99
c dow not *in99 [or %eof]
c eval line1(x) = name
c eval line2(x) = address
c eval line3(x) = city + state
c eval line4(x) = zip
c eval x = x + 1
c if x > 4
c exsr write1
c reset x
c endif
c read file 99
c enddo
c eval *inlr = *on
c write1 begsr
c movel line1(1) oline1
c movel line1(2) oline2
c movel line1(3) oline3
c movel line1(4) oline4
c write output
c movel line2(1) oline1
c * repeat for line3, line4
c write spacer
c endsr

dds stuff
a r output
a oline1 30 1
a oline2 30 32
a oline3 30 64
a oline4 30 86 spacea(1)
a r spacer
a 1 ' ' spacea(2)


HTH,
Loyd
--  
"You can nail me, but not to a tree."
lgoodbar@watervalley.net  ICQ#504581  http://www.watervalley.net/users/lgoodbar/
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.