Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: Mapping & Hash Issues

by runrig (Abbot)
on Mar 29, 2017 at 17:34 UTC ( #1186406=note: print w/replies, xml ) Need Help??


in reply to Re^4: Mapping & Hash Issues
in thread Mapping & Hash Issues

Maybe there's something wrong with record 1840 in your input file?

Replies are listed 'Best First'.
Re^6: Mapping & Hash Issues
by sandeepsinghperl (Novice) on Mar 29, 2017 at 18:52 UTC

    Hi

    My Input file is very small- 3 lines

    I updated the script by removing my. But it just updated the first row with correct Cocenter & Activity but Second Row it just updated the Costcenter but not the Activity. See below out file - first row is fine but second it should also update the Activity to A5854.

    "BegBalance" "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oc +t" "Nov" "Dec" "Period" ,,,,,,,,,,,,,,,,,, "FY01","HSP_InputValue","Local","Plan","Final","10","C4910","A5854","E +1900","52112",#Mi,1,2,3,4,5,6,7,8,9,10,11,12 "FY01","HSP_InputValue","Local","Plan","Final","10","C4910","A0000","E +1900","52122",#Mi,1,2,3,4,5,6,7,8,9,10,11,12

      Do you have CostCentre, Activity C4910,A0000 in your mapping file ?

      poj

        Hi Again

        My input file have

        "BegBalance" "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oc +t" "Nov" "Dec" "Period" ,,,,,,,,,,,,,,,,,, "FY01","HSP_InputValue","Local","Plan","Final","10","C4000","A0000","E +1900","52112",#Mi,1,2,3,4,5,6,7,8,9,10,11,12 "FY01","HSP_InputValue","Local","Plan","Final","10","C4000","A0000","E +1900","52122",#Mi,1,2,3,4,5,6,7,8,9,10,11,12

        My Mapping file have

        "C4000","A0000","C4910","A5854"

        My output file is getting generated after running your script is below, Ideally it should check "C4000","A0000" in mapping file if its there then has to update both with "C4910","A5854" for all the rows/line. What your script is doing its just updating the first Row and from second its just updating C4000 to C4910 but not updating A0000 to A5854. I dont have A4910 and A0000 combination in mapping file.

        If you are ok then can i send you a webex please so that you can take look ?

        "BegBalance" "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oc +t" "Nov" "Dec" "Period" ,,,,,,,,,,,,,,,,,, "FY01","HSP_InputValue","Local","Plan","Final","10","C4910","A5854","E +1900","52112",#Mi,1,2,3,4,5,6,7,8,9,10,11,12 "FY01","HSP_InputValue","Local","Plan","Final","10","C4910","A0000","E +1900","52122",#Mi,1,2,3,4,5,6,7,8,9,10,11,12
      The first line isn't valid CSV, so I don't think you actually found it in the output file. Copy and paste error on your side?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1186406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2019-04-21 16:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (111 votes). Check out past polls.

    Notices?