Newby questions.
Newby questions.
(OP)
Hello,
Have a Rexx program that I am trying to modify.
1) DO WHILE LINES(inventoryfile)
PARSE VALUE LINEIN(inventoryfile) WITH 16 ALTPART 27 . 133 MIVINTXCODE 134 . 210 MIVLSTVEND 220 MANUALCOST 230 . 290 MIVONHANDAMT 299 . 343 MIVPRICE1 353 . 373 MIVPRODCOD 398 MIVPRODDESC 430 . 517 MIVXSRETAIL 528 .
How do I output this file so I can determine the position of an additional field?
2) Can I see/output the PARSE VALUE?
Thank you for the help...
Sorry for the new-by questions. Just trying to wrap my head around this.
Have a Rexx program that I am trying to modify.
1) DO WHILE LINES(inventoryfile)
PARSE VALUE LINEIN(inventoryfile) WITH 16 ALTPART 27 . 133 MIVINTXCODE 134 . 210 MIVLSTVEND 220 MANUALCOST 230 . 290 MIVONHANDAMT 299 . 343 MIVPRICE1 353 . 373 MIVPRODCOD 398 MIVPRODDESC 430 . 517 MIVXSRETAIL 528 .
How do I output this file so I can determine the position of an additional field?
2) Can I see/output the PARSE VALUE?
Thank you for the help...
Sorry for the new-by questions. Just trying to wrap my head around this.
RE: Newby questions.
CODE -->
16 ALTPART 27 - store the data from position 16 of the chunk of data read by linein up to position 26 in variable ALTPART
27 . 133 - the chunk of data from columns 27 to 132 - discard
etc
After PARSEing the line you can SAY the various values.
It is all in the manual. PARSE comes under KEYWORDS in the contents but usually has a later section all to itself to explain the various options.
Nic