Shouldn't SUB have SUBROUTINE and arguments (REC) on line 1?

 

Vance Alspach

J & L Industrial Supply

An MSC Company

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sanjeebkumar
Sarangi
Sent: Tuesday, March 13, 2007 7:40 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Error in report generation.

 

Hi

I tried to generate a report by writing a small program. But I got an error

as below.

 

ERROR:

 

>RUN TEST.BP MAIN

MAIN

 

45 record(s) selected to SELECT list #0.

Program "SUB": Line 3, Variable "REC" previously undefined.  Empty string

used.

Program "SUB": Line 3, Printer name UVDEFAULT is not recognized by the

system.

 

CODE:

 

>ED TEST.BP

Record name = MAIN

15 lines long.

 

----: P

0001: CRT 'MAIN'

0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP

0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'

0004: EXECUTE SENT

0005: EOF = 0

0006: LOOP

0007: READNEXT ITEM_CODE ELSE

0008: EOF = 1

0009: END

0010: UNTIL EOF DO

0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN

0012: CALL SUB

0013: END

0014: REPEAT

0015: STOP

Bottom at line 15.

----: Q

 

File name        = TEST.BP

Record name = SUB

6 lines long.

 

----: P

0001:CRT 'SUB'

0002: PRINTER ON

0003: PRINT "ITEM_CODE"  "L#16":REC<1>

0004: PRINT "DESCRIPTION"  "L#16": REC<2>

0005: PRINT "TYPE"  "L#16":REC<3>

0006: PRINTER OFF

0007: RETURN

Bottom at line 7.

----:

How do I resolve this?

 

 

Thanks

Sanjeeb

This e-mail is intended for the use of the addressee(s) only and may contain
privileged, confidential, or proprietary information that is exempt from
disclosure under law. If you are not the intended recipient, please do not
read, copy, use or disclose the contents of this communication to others.
Please notify the sender that you have received this e-mail in error by
replying to the e-mail. Please then delete the e-mail and destroy any copies
of it. Thank you.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to