Link to home
Start Free TrialLog in
Avatar of kopibean
kopibean

asked on

Shortcut to print this data???

I want the parameters to be different but instead it keep on printing the same parameter for me. This is consider as 1 parameter:
XB8B_Amodul
_R1K_R_Rmea

And also, I want for each parameter,
there are to be 5 values for each different parameter. And I am require to print for a row at least 6 parameters which are all different.
How do i achieve that?
If this is unclear to you,please take a look at my code,my incorrect output and my actual output(I provided part of it).

Thanks a lot!!!

My incorrect output:

XB8B_Amodul XB8B_Amodul XB8B_Amodul
_R1K_R_Rmea _R1K_R_Rmea _R1K_R_Rmea
...........................

1.003E+03   3.980E-08   4.994E-04

XB8B_Amodul XB8B_Amodul XB8B_Amodul
_R1K_R_Rmea _R1K_R_Rmea _R1K_R_Rmea
...........................

9.943E+02   3.994E-08   4.968E-04

XB8B_Amodul XB8B_Amodul XB8B_Amodul
_R1K_R_Rmea _R1K_R_Rmea _R1K_R_Rmea
...........................

1.000E+03   3.949E-08   4.979E-04


I want the output to be like this(I provided only 3 values n 3 parameters):

XB8B_Amodul XB8B_Amodul XB8B_Amodul
 _R1K_R_Rmea _MFA1_FETCH _MFA1_FETCH
......................................

 1.003E+03   3.980E-08   4.994E-04  
 9.943E+02   3.994E-08   4.968E-04  
 1.000E+03   3.949E-08   4.979E-04

XB8B_Amodul XB8B_Bmodul XB8B_Bmodul
 _MFA2_VT_Vt _MFB1_VT_Vt _MFB2_VT_Vt
.......................................

 2.480E+00   2.484E+00   2.484E+00  
 2.493E+00   2.487E+00   2.491E+00  
 2.487E+00   2.495E+00   2.481E+00  


My codes:


open(NEWFILE,">plusfile");
format NEWFILE =
@<<<<<<<<<<<@<<<<<<<<<<<@<<<<<<<<<<
 $testPara1[$_],    $testPara1[$_],   $testPara1[$_]
@<<<<<<<<<<<@<<<<<<<<<<<@<<<<<<<<<<
 $testPara2[$_],    $testPara2[$_],   $testPara2[$_]
...........................

@<<<<<<<<<<<@<<<<<<<<<<<@<<<<<<<<<<<<
sprintf("%.3E",$info1[$_]),   sprintf("%.3E",$info1[$_+1]),    sprintf("%.3E",$info1[$_+2])

.

open(FILE,"tablefile5");
@file1 = <FILE>;
foreach(@file1)
{
  if(/.*!.*!.*!.*!/)
  {
    ($str1,$str2,$str3,$str4) = split(/!/,$_);
    push(@stuff,$str1);
    $para1 = substr($stuff[$_],0,11);
    push(@testPara1,$para1);
    $para2 = substr($stuff[$_],12,11);
    push(@testPara2,$para2);
  }
  push (@info1,/!\+([0-9E.+\-]+)/g) if(/SYS_WAFERID!01/.../SYS_WAFERID!01/);
  push (@info2,/!\+([0-9E.+\-]+)/g) if(/SYS_WAFERID!02/.../SYS_WAFERID!02/);
 
}
for(0..$#info1)
{
write NEWFILE;
}
close(FILE);
close(NEWFILE);

Avatar of ozo
ozo
Flag of United States of America image

What is the input tablefile5 that should produce the above output in plusfile?
Avatar of kopibean
kopibean

ASKER

it is a large file.
Should i sent it to ur email address to make it more convenient for you??
Can't it be done with a small file (provided only 3 values n 3 parameters)?
I provided you with 2 SYS_WAFERID(SYS_WAFERID!01 and SYS_WAFERID!02)
with 5 parameters and 5 values


Here it is:

SYS_WAFERID!01
=16x9
XB8B_Amodule_R1K_R_Rmeas!1K ohm resister!R!ohm!+1.002825E+03!+9.942619E+02!+9.999966E+02
XB8B_Amodule_MFA1_FETCHK_Idoff!MOSFET!R!A!+3.979751E-08!+3.994000E-08!+3.949102E-08
XB8B_Amodule_MFA1_FETCHK_Idon!MOSFET!R!A!+4.994273E-04!+4.967769E-04!+4.978503E-04
XB8B_Amodule_MFA1_VT_Vt!!R!V!+2.495615E+00!+2.495548E+00!+2.498353E+00
XB8B_Amodule_MFA2_FETCHK_Idoff!MOSFET!R!A!+3.960785E-08!+3.948195E-08!+3.985337E-08
=7x2
SYS_WAFERID!01
SYS_TESTSTART!09:15:39
SYS_TESTEND!09:15:52
SYS_DIECOUNT!5
SYS_WAFERPASS!1
SYS_TESTSEQ!1
SYS_SLOTNO!
=1x2
SYS_WAFERID!02
=16x9
XB8B_Amodule_R1K_R_Rmeas!1K ohm resister!R!ohm!+9.975869E+02!+9.950317E+02!+1.000017E+03
XB8B_Amodule_MFA1_FETCHK_Idoff!MOSFET!R!A!+3.951925E-08!+3.985374E-08!+3.948575E-08
XB8B_Amodule_MFA1_FETCHK_Idon!MOSFET!R!A!+4.964775E-04!+4.998018E-04!+4.956429E-04
XB8B_Amodule_MFA1_VT_Vt!!R!V!+2.488158E+00!+2.495095E+00!+2.499833E+00
XB8B_Amodule_MFA2_FETCHK_Idoff!MOSFET!R!A!+3.943191E-08!+3.963861E-08!+3.998587E-08
=7x2
SYS_WAFERID!02


Thanks a lot for your patience and help!!

If I run your "My codes:" above on that input, it does not produce your "My incorrect output:" above, so I'm a little confused how you'd want to modify it to produce your "I want the output to be like this(I provided only 3 values n 3 parameters):"
It is because you need to get my whole of the tablefile5 before you can get my incorrect output.Or else, you will not get my incorrect output one

You get what i mean?
Me really really need this urgently.
Please help me
If possible,i send to your email address
okie?
Would I also need your whole of the tablefile5 to get your correct output?
What output should the above tablefile5 with 5 parameters and 5 values produce?
Yup!!U need the whole of my tablefile5 to get my correct output.
The whole of tablefile5 will produce each row 6 parameters(max) then for each parameter,there are 5 values for it.

So u really need my tablefile5 in order to help me to get the correct output
pleaseeeee
is there a way to describe simply in english how the output is supposed to be produced from the input?
From the input file tablefile5,
you will get a output like this

Waf si XB8B_Amodul XB8B_Amodul XB8B_Amodul
       _R1K_R_Rmea _MFA1_FETCH _MFA1_FETCH
............................................

  1  1  1.003E+03   3.980E-08   4.994E-04  
  1  7  9.943E+02   3.994E-08   4.968E-04  
  1  9  1.000E+03   3.949E-08   4.979E-04  
  1  3  1.001E+03   3.949E-08   4.965E-04  
  1  5  9.952E+02   3.963E-08   4.999E-04  

  2  1  9.976E+02   3.952E-08   4.965E-04  
  2  7  9.950E+02   3.985E-08   4.998E-04  
  2  9  1.000E+03   3.949E-08   4.956E-04  
  2  3  9.977E+02   3.956E-08   4.983E-04  
  2  5  9.951E+02   3.960E-08   4.976E-04  

  3  1  9.992E+02   3.955E-08   4.976E-04  
  3  7  9.983E+02   3.991E-08   4.983E-04  
  3  9  9.983E+02   4.000E-08   4.988E-04  
  3  3  1.002E+03   3.973E-08   4.956E-04  
  3  5  9.989E+02   3.987E-08   4.993E-04  




Waf si XB8B_Amodul XB8B_Bmodul XB8B_Bmodul
       _MFA2_VT_Vt _MFB1_VT_Vt _MFB2_VT_Vt
............................................

  1  1  2.480E+00   2.484E+00   2.484E+00  
  1  7  2.493E+00   2.487E+00   2.491E+00  
  1  9  2.487E+00   2.495E+00   2.481E+00  
  1  3  2.485E+00   2.482E+00   2.476E+00  
  1  5  2.479E+00   2.499E+00   2.482E+00  

  2  1  2.476E+00   2.496E+00   2.497E+00  
  2  7  2.487E+00   2.479E+00   2.479E+00  
  2  9  2.497E+00   2.480E+00   2.492E+00  
  2  3  2.490E+00   2.492E+00   2.499E+00  
  2  5  2.486E+00   2.483E+00   2.489E+00  

  3  1  2.477E+00   2.493E+00   2.484E+00  
  3  7  2.486E+00   2.489E+00   2.477E+00  
  3  9  2.480E+00   2.483E+00   2.491E+00  
  3  3  2.499E+00   2.484E+00   2.490E+00  
  3  5  2.493E+00   2.497E+00   2.485E+00  



The above are just 3 parameters with 5 values for each parameter ,and the Waf is refering to the SYS_WAFERID!01 n etc.
In addition, I need to check whether my program will work regardless whether there are 25 SYS_WAFERID or less than that.And the values can be 3 or 5 or 7 or 9 values for each parameter.
Thus, you can my meaning??
Once the first row of 6 parameters is filled,it will have another row of 6 parameters with different names and etc.
You understood the whole thing??
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you briefly explain what the above codes will do??
Me does not really understand.
Will the above work in a version that is less than perl 5?