at the following path
\\ncsusnasent02.na.jnj.com\its_diq_na_win_dev\PowerCenter\infa_shared\WCPIT_BIO_EDW\SrcFiles\DDDMD\DDD.CLI026.WK0933.DDDMR45.001.head
I have one file
DDD.CLI026.WK0933.DDDMR45.001.head
if i open this file
i get data as following(in a single line)
HEADER0101IMS HEALTHDMD Weekly D DD.CLI026.WK0933.DDDMR45 Centocor DMDDRM45 W2009080210120090831125325ssnyder@us.imshealth.com
TRAIL0101 000000000581 0000000000CKSUM000002236804730
we need to copy 581(it will not be same always it gets updated everyday) from this file
and update it at following location
\\ncsusnasent02.na.jnj.com\its_diq_na_win_dev\PowerCenter\infa_shared\WCPIT_BIO_EDW\PrmFiles\LND\IMS_FILE_to_LND.par
when i open this file it has data as following
[WCPIT_BIO_EDW.WF:w_DDDMD_LNDG_IMS_NONRET_SALES]
$$Cust_RowCount=72648
$$Sales_RowCount=5235998
$$OuletChangeLog_RowCount=931
**$$DRM45_RowCount=581**
$$Control_RowCount=4495
$$Outl_Subcat_RowCount=105
$$Fac_Subcat_RowCount=149
we need to update 581 against $$DRM45_RowCount
Best Answer
Assuming that header is all on a single line (and the "**" are added by you just to emphasize what you want extracted), you can extract the number with:
This extracts the number (assuming your file is specified correctly). The expression "0 + n" will strip off leading zeros. Then, using my code from your other question:
Now
newparfile
should contain the value you want.