Creating CIM load File

Hi,

It is quite simple!

These are the rules!
. As the only character on a line will act as Esc / F4
- Will act as tab
"" use quotes around any character values, to make sure
Space, will tell to go to the next field.

F5/Ctrl-d, ... Cant be done.

Sample appl:

Application Input:
Field group One
Ordernbr - Empty generates next nbr.

Field Group Two:
Customer

Field Group Three:
Shipto - Defaults the same as customer

Field group 4
Order date
3 fields with default ok
Remarks - Max 24 character
Rest with default ok

Repeat:
Field group 5
So Line - Defaults next line

Field group 6
Item
Qty
price

F4 leaves.
end.

Field group 7
Creator

return to field group 1

Sample appl:
OUTPUT TO txt.inp.
PUT UNFORMATTED
"-" SKIP /* next order number */
QUOTER("12345678") SKIP /* Customer */
"-" SKIP /* Default Ship */
TODAY
' - - - '
QUOTER(SUBSTRING(rmks,1,24)) SKIP.
/* Item loop */
FOR EACH items:
PUT UNFORMATTED
"-" SKIP /* Next line */
QUOTER(itemnbr) ' '
ROUND(qty,2) ' '
ROUND(price,4) SKIP.
END.
PUT UNFORMATTED
"." SKIP. /* Leave line loop */
PUT UNFORMATTED
QUOTER(gCreator) SKIP
"." SKIP. /* Leave order maint */
OUTPUT CLOSE.
INPUT FROM txt.inp.
OUTPUT TO txt.out KEEP-MESSAGES.
RUN ordappl.p.
INPUT CLOSE.
OUTPUT CLOSE.

I hope this explains! regards Ole
 
Back
Top