filename myjson temp;
data _null_;
file myjson;
infile datalines;
input;
put _infile_;
datalines;
{"firstName":"Gustave1","lastName":"Karma1","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"FR","embeddedData":{"appLoginInd":"N","ubiStatus":"NO UBI","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-19","transactionType":"QUOAUTO","customerTenure":0,"policyNumber":"10000001","policyType":"AUP","cntrct_ref_nbr":11111101,"dim_pl_cntrct_ver_key":10000001,"productHolding":"AUP","agentId":"RRRRRR01","agentEmployeeNbr":"777701","agentName":"mr1 unknow1","agentEmail":"someone@hotmail.com","agentManager":"Mg1 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA1","agentHireDt":"2021-10-18"}},
{"firstName":"Gustave2","lastName":"Karma2","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"Y","ubiStatus":"ACTIVE","postalCode":"H0H 0H0","provinceCode":"ON"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-18","transactionType":"HOMEMOD","customerTenure":12,"policyNumber":"10000002","policyType":"RE","cntrct_ref_nbr":11111102,"dim_pl_cntrct_ver_key":10000002,"productHolding":"ALL","agentId":"RRRRRR02","agentEmployeeNbr":"777702","agentName":"mr2 unknow2","agentEmail":"someone@hotmail.com","agentManager":"Mg2 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA2","agentHireDt":"2021-10-22"}},
{"firstName":"Gustave3","lastName":"Karma3","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"FR","embeddedData":{"appLoginInd":"Y","ubiStatus":"REGISTERED_APP","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-09","transactionType":"NEWHOME","customerTenure":0,"policyNumber":"10000003","policyType":"RE","cntrct_ref_nbr":11111103,"dim_pl_cntrct_ver_key":10000003,"productHolding":"ALL","agentId":"RRRRRR03","agentEmployeeNbr":"777703","agentName":"mr3 unknow3","agentEmail":"someone@hotmail.com","agentManager":"Mg3 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA3","agentHireDt":"2022-09-26"}},
{"firstName":"Gustave4","lastName":"Karma4","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"FR","embeddedData":{"appLoginInd":"N","ubiStatus":"NO UBI","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-19","transactionType":"QUOAUTO","customerTenure":0,"policyNumber":"10000004","policyType":"AUP","cntrct_ref_nbr":11111104,"dim_pl_cntrct_ver_key":10000004,"productHolding":"AUP","agentId":"RRRRRR04","agentEmployeeNbr":"777704","agentName":"mr4 unknow4","agentEmail":"someone@hotmail.com","agentManager":"Mg4 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAA4","agentHireDt":"2022-06-13"}},
{"firstName":"Gustave5","lastName":"Marma5","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"Y","ubiStatus":"ENROLLED PROGRAM","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-12","transactionType":"AUTOMOD","customerTenure":1,"policyNumber":"10000005","policyType":"AUP","cntrct_ref_nbr":11111105,"dim_pl_cntrct_ver_key":10000005,"productHolding":"AUP","agentId":"RRRRRR05","agentEmployeeNbr":"777705","agentName":"mr5 unknow5","agentEmail":"someone@hotmail.com","agentManager":"Unknown","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA5","agentHireDt":"2022-09-26"}},
{"firstName":"Gustave6","lastName":"Karma6","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"Y","ubiStatus":"NO UBI","postalCode":"H0H 0H0","provinceCode":"ON"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-19","transactionType":"AUTOMOD","customerTenure":123,"policyNumber":"10000006","policyType":"AUP","cntrct_ref_nbr":11111106,"dim_pl_cntrct_ver_key":10000006,"productHolding":"ALL","agentId":"RRRRRR06","agentEmployeeNbr":"777706","agentName":"mr6 unknow6","agentEmail":"someone@hotmail.com","agentManager":"Mg6 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA6","agentHireDt":"2022-05-27"}},
{"firstName":"Gustave7","lastName":"Karma7","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"N","ubiStatus":"NO UBI","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-19","transactionType":"NEWDUO","customerTenure":0,"policyNumber":"10000007","policyType":"RE","cntrct_ref_nbr":11111107,"dim_pl_cntrct_ver_key":10000007,"productHolding":"ALL","agentId":"RRRRRR07","agentEmployeeNbr":"777707","agentName":"mr7 unknow7","agentEmail":"someone@hotmail.com","agentManager":"Mg7 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA7","agentHireDt":"2019-01-14"}},
{"firstName":"Gustave8","lastName":"Karma8","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"N","ubiStatus":"NO UBI","postalCode":"H0H 0H0","provinceCode":"AB"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-20","transactionType":"QUOAUTO","customerTenure":0,"policyNumber":"10000008","policyType":"AUP","cntrct_ref_nbr":11111108,"dim_pl_cntrct_ver_key":10000008,"productHolding":"AUP","agentId":"RRRRRR08","agentEmployeeNbr":"777708","agentName":"mr8 unknow8","agentEmail":"someone@hotmail.com","agentManager":"Unknown","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA8","agentHireDt":"2020-03-02"}},
{"firstName":"Gustave9","lastName":"Karma9","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"N","ubiStatus":"NO UBI","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-19","transactionType":"QUOAUTO","customerTenure":0,"policyNumber":"10000009","policyType":"AUP","cntrct_ref_nbr":11111109,"dim_pl_cntrct_ver_key":10000009,"productHolding":"AUP","agentId":"RRRRRR09","agentEmployeeNbr":"777709","agentName":"mr9 unknow9","agentEmail":"someone@hotmail.com","agentManager":"Mg9 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA9","agentHireDt":"2021-04-12"}},
{"firstName":"Gustave10","lastName":"Karma10","email":"someone@hotmail.com","extRef":"12345678-1234-MNOP-1234-ABCDEFGHIJKL","language":"EN","embeddedData":{"appLoginInd":"Y","ubiStatus":"FORMER UBI","postalCode":"H0H 0H0","provinceCode":"QC"},"transactionData":{"distributor":"BEL","transactionDate":"2023-01-18","transactionType":"AUTOMOD","customerTenure":11,"policyNumber":"10000010","policyType":"AUP","cntrct_ref_nbr":11111110,"dim_pl_cntrct_ver_key":10000010,"productHolding":"AUP","agentId":"RRRRRR10","agentEmployeeNbr":"777710","agentName":"mr10 unknow10","agentEmail":"someone@hotmail.com","agentManager":"Mg10 Audi","managerEmail":"someone@hotmail.com","agentTeamCd":"AAAA10","agentHireDt":"2022-06-13"}}
;
run;
libname dest1 JSON fileref=myjson;
proc copy inlib=dest1 outlib=work;
run;
What we read from the oracle table is what you see into the datalines and it seems that it does not like the comma at the first line, column 705.
... View more