Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newby questions.

Status
Not open for further replies.

PPaat

IS-IT--Management
Mar 28, 2017
1
US
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.
 
PARSE VALUE LINEIN(inventoryfile) WITH" - you cannot see any of this - it is language keywords. You can see the value from inventory file by reading it into a variable in a previous statement and "SAY"ing the variable...
Code:
myVar = Linein(inventoryfile)
Say myvar
The rest of your PARSE line is a template which starts like this:
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
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top