I'm new to mload. I get this error when I try to execute my mload script:
uty4014 access module error 35 received during 'comm_pmreadddparse' operation:'Unable to determine EOR for the datafile !ERROR! Could not find a valid EOR'.
Also providing the mload script:
.logtable ALL_wkSCRATCHPAD_DB.Coverage_log;
.logmech ldap;
.logdata authcid= password=;
.LOGON tdip/;
DROP Table ALL_WKSCRATCHPAD_DB.Coverage;
DROP Table ALL_WKSCRATCHPAD_DB.error_1;
DROP Table ALL_WKSCRATCHPAD_DB.error_2;
DROP Table ALL_WKSCRATCHPAD_DB.Coverage_WK;
CREATE SET TABLE ABCD_DB.Coverage
(
COVG_KEY VARCHAR(50),
TRANSACTION_TYPE VARCHAR(20),
POLICY_NUMBER VARCHAR(18),
PRODUCER VARCHAR(17),
AGENT_NAME VARCHAR(64),
TRANSACTION_PROCESS_DATE VARCHAR(20),
ENDORSEMENT_EFFECTIVE_DATE VARCHAR(10),
ENDORSEMENT_EXPIRATION_DATE VARCHAR(10),
POLICY_EFFECTIVE_DATE VARCHAR(10),
POLICY_EXPIRATION_DATE VARCHAR(10),
LINE_OF_BUSINESS VARCHAR(10),
STATE VARCHAR(2),
PREMIUM_AMOUNT VARCHAR(20),
COMPANY VARCHAR(32),
NAICS_CODE VARCHAR(6),
GL_CLASS_CODE VARCHAR(5),
BUSINESS_CLASS_DESCRIPTION VARCHAR(64),
PARTY_NAME VARCHAR(64),
PARTY_TYPE_CD VARCHAR(16),
BUSINESS_PHONE VARCHAR(10),
BL_STREET_ADDRESS_LINE_1 VARCHAR(64),
BL_STREET_ADDRESS_LINE_2 VARCHAR(64),
BL_STREET_ADDRESS_LINE_3 VARCHAR(32),
BL_COUNTRY VARCHAR(32),
BL_STATE VARCHAR(2),
BL_CITY VARCHAR(64),
BL_ZIP VARCHAR(10),
BL_COUNTY VARCHAR(32),
STATUS_CD VARCHAR(3),
QUOTE_CREATED_DATE VARCHAR(20)
);
.BEGIN IMPORT MLOAD TABLES ALL_WKSCRATCHPAD_DB.Coverage
WORKTABLES ALL_WKSCRATCHPAD_DB.Coverage_WK
ERRORTABLES ALL_wkSCRATCHPAD_DB.error_1
ALL_wkSCRATCHPAD_DB.error_2
SESSIONS 5;
.LAYOUT INPUT_RECORD;
.FIELD COVG_KEY * VARCHAR(50);
.FIELD TRANSACTION_TYPE * VARCHAR(20);
.FIELD POLICY_NUMBER * VARCHAR(18);
.FIELD PRODUCER * VARCHAR(17);
.FIELD AGENT_NAME * VARCHAR(64);
.FIELD TRANSACTION_PROCESS_DATE * VARCHAR(6);
.FIELD ENDORSEMENT_EFFECTIVE_DATE * VARCHAR(10);
.FIELD ENDORSEMENT_EXPIRATION_DATE * VARCHAR(10);
.FIELD POLICY_EFFECTIVE_DATE * VARCHAR(10);
.FIELD POLICY_EXPIRATION_DATE * VARCHAR(10);
.FIELD LINE_OF_BUSINESS * VARCHAR(10);
.FIELD STATE * VARCHAR(2);
.FIELD PREMIUM_AMOUNT * VARCHAR(20);
.FIELD COMPANY * VARCHAR(32);
.FIELD NAICS_CODE * VARCHAR(6);
.FIELD GL_CLASS_CODE * VARCHAR(5);
.FIELD BUSINESS_CLASS_DESCRIPTION * VARCHAR(64);
.FIELD PARTY_NAME * VARCHAR(64);
.FIELD PARTY_TYPE_CD * VARCHAR(16);
.FIELD BUSINESS_PHONE * VARCHAR(10);
.FIELD BL_STREET_ADDRESS_LINE_1 * VARCHAR(64);
.FIELD BL_STREET_ADDRESS_LINE_2 * VARCHAR(64);
.FIELD BL_STREET_ADDRESS_LINE_3 * VARCHAR(32);
.FIELD BL_COUNTRY * VARCHAR(32);
.FIELD BL_STATE * VARCHAR(2);
.FIELD BL_CITY * VARCHAR(64);
.FIELD BL_ZIP * VARCHAR(10);
.FIELD BL_COUNTY * VARCHAR(32);
.FIELD STATUS_CD * VARCHAR(3);
.FIELD QUOTE_CREATED_DATE * VARCHAR(10);
.DML LABEL insdml;
insert into ALL_WKSCRATCHPAD_DB.Coverage
(
COVG_KEY
,TRANSACTION_TYPE
,POLICY_NUMBER
,PRODUCER
,AGENT_NAME
,TRANSACTION_PROCESS_DATE
,ENDORSEMENT_EFFECTIVE_DATE
,ENDORSEMENT_EXPIRATION_DATE
,POLICY_EFFECTIVE_DATE
,POLICY_EXPIRATION_DATE
,LINE_OF_BUSINESS
,STATE
,PREMIUM_AMOUNT
,COMPANY
,NAICS_CODE
,GL_CLASS_CODE
,BUSINESS_CLASS_DESCRIPTION
,PARTY_NAME
,PARTY_TYPE_CD
,BUSINESS_PHONE
,BL_STREET_ADDRESS_LINE_1
,BL_STREET_ADDRESS_LINE_2
,BL_STREET_ADDRESS_LINE_3
,BL_COUNTRY
,BL_STATE
,BL_CITY
,BL_ZIP
,BL_COUNTY
,STATUS_CD
,QUOTE_CREATED_DATE
)
values
(
:COVG_KEY
,:TRANSACTION_TYPE
,:POLICY_NUMBER
,:PRODUCER
,:AGENT_NAME
,:TRANSACTION_PROCESS_DATE
,:ENDORSEMENT_EFFECTIVE_DATE
,:ENDORSEMENT_EXPIRATION_DATE
,:POLICY_EFFECTIVE_DATE
,:POLICY_EXPIRATION_DATE
,:LINE_OF_BUSINESS
,:STATE
,:PREMIUM_AMOUNT
,:COMPANY
,:NAICS_CODE
,:GL_CLASS_CODE
,:BUSINESS_CLASS_DESCRIPTION
,:PARTY_NAME
,:PARTY_TYPE_CD
,:BUSINESS_PHONE
,:BL_STREET_ADDRESS_LINE_1
,:BL_STREET_ADDRESS_LINE_2
,:BL_STREET_ADDRESS_LINE_3
,:BL_COUNTRY
,:BL_STATE
,:BL_CITY
,:BL_ZIP
,:BL_COUNTY
,:STATUS_CD
,:QUOTE_CREATED_DATE
);
.IMPORT INFILE '/home/adepum2/ABDC.txt'
FORMAT VARTEXT '|'
display errors
NOSTOP
LAYOUT INPUT_RECORD
APPLY insdml;
.END MLOAD;
.LOGOFF;
My txt file looks like:
||ACP 3008641853|00055050-140|JOHN RUSSELL MORAN|02/06/2018 08:52:00|||||GL||13538.00||||||||265 Buckingham Ct|||||ILSchaumburg|601932084||||02/06/2018 08:33:00
I have tried to look for any Regex in my text file but not able to find it.
Your help would be really appreciated.
Thanks,
phantom
I finally solved the issue. The issue was about the file type and also with the EOR it was LF not CRLF. I made changes to it and the only file type it was accepting was .DAT. I m not sure why the .DAT file type is being accepted only not the other types.
Thanks guys for your suggestions and spending your valuable time.