Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You could try</p> <pre><code>awk -F"|" -f parse.awk *inputparams.txt </code></pre> <p>where <code>parse.awk</code> is:</p> <pre><code>BEGIN { OFS="," } { getFields() split($0,a,"["); split(a[4],b,"]"); split(b[1],c,","); if (c[2]==1) msi="POSTPAID" else if (c[2]==2) msi="PREPAID" msi=msi","c[1] split($0,d,",") pack=d[3] print f1,f2,f3,f4,f5,f8,pack,msi } function getFields() { f1=$1; f2=$2; f3=$3; f4=$4; f5=$5; f8=$8 if ($2==1) { if ($3==1) { f3="Subscription Creation without Previous" } if ($3==5) { f3="Offer Upgrade" } if ($3==6) { f3="Offer Downgrade" } if ($3==7) { f3="Campaign Extend" } if ($3==8) { f3="Campaign Change" } if ($3==27) { f3="Subscription Update" } } if ($2==2) { if ($3==2) { f3="Charging Renewal" } if ($3==3) { f3="Subscription Reactivation" } if ($3==4) { f3="Subscription Reactivation with Recharge Monitoring" } if ($3==8) { f3="Campaign Change" } if ($3==30) { f3="Limited Service" } } if ($2==3) { if ($3==11) { f3="Cancellation" } if ($3==17) { f3="Subscriber Account Reactivation" } } if ($2==4) { if ($3==11) { f3="Cancellation" } } if ($2==5) { if ($3==11) { f3="Cancellation" } if ($3==12) { f3="Expiration" } if ($3==13) { f3="Inactivation due to Charging" } if ($3==14) { f3="Inactivation due to Ceased Account" } if ($3==15) { f3="Inactivation due to Payment Method Change" } if ($3==16) { f3="Inactivation due to Ownership Change" } if ($3==18) { f3="Inactivation due to Offer Upgrade" } if ($3==19) { f3="Inactivation due to Offer Downgrade" } } if ($2==6) { if ($3==9) { f3="Campaign Schedule" } if ($3==10) { f3="Offer Schedule" } } if ($1==5 &amp;&amp; $2==2) { f2="RENEWAL" } if ($1==4 &amp;&amp; $2==2) { f2="SUBS. CREATE RENEWAL AOC" } if ($1==6 &amp;&amp; $2==3) { f2="REFUND" } if ($1==4 &amp;&amp; $2==5) { f2="INACTIVATION" } if ($1==5 &amp;&amp; $2==4) { f2="PENALTY" } if ($1==5 &amp;&amp; $2==1) { f2="SUBS. CREATE DIRECT DEBIT" } if ($2==1) { f2="CREATION" } if ($1==1) { f1="RESERVE" } if ($1==2) { f1="COMMIT" } if ($1==3) { f1="ROLLBACK" } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload