Mload issue

Tools & Utilities

Mload issue

I have the following mload script where I need to assign a default value for JOB_TTL_NM in .dml. Can any body tell me how this can be done. I tried putting the default value in different formats like

'Non-Associate' , "Non-Associate"

:JOB_TTL_NM = 'Non-Associate'. But, getting error...

.logtable UD131.ABC_LT;

.logon ABC/XXX,XYZ;

.begin mload

tables UD131.ABC

worktables UD131.ABC_WT

errortables UD131.ABC_ET UD131.ABC_UV

sessions 10

sleep 10

tenacity 4

errlimit 1;

.layout mylayout;

.field ENT_USER_ID * VARCHAR(6);

.field EMPL_LST_NM * VARCHAR(80);

.field EMPL_FRST_NM * VARCHAR(80);

.field EMAIL_ADR * VARCHAR(180);

.field LEVEL_DESC * VARCHAR(80);

.field JOB_TTL_NM * VARCHAR(50);

.field MGR_LST_NM * VARCHAR(80);

.field MGR_FRST_NM * VARCHAR(80);

;

.dml label mydml;

insert into UD131.ABC

(

ENT_USER_ID ,

EMPL_LST_NM,

EMPL_FRST_NM,

EMAIL_ADR,

LEVEL_DESC,

JOB_TTL_NM,

MGR_LST_NM,

MGR_FRST_NM,

)

values

(

:ENT_USER_ID ,

:EMPL_LST_NM,

:EMPL_FRST_NM,

:EMAIL_ADR,

:LEVEL_DESC,

:JOB_TTL_NM = 'Non-Associate',

:MGR_LST_NM,

:MGR_FRST_NM,

);

.import infile myfile.csv

format vartext ','

layout mylayout

apply mydml;

.end mload;

.LOGOFF;
3 REPLIES
Highlighted
Enthusiast

Re: Mload issue

values

(

:ENT_USER_ID ,

:EMPL_LST_NM,

:EMPL_FRST_NM,

:EMAIL_ADR,

:LEVEL_DESC,

'Non-Associate',

:MGR_LST_NM,

:MGR_FRST_NM,

);
Enthusiast

Re: Mload issue

Hi,

Did it work that solution? What I feel is that you can define at table level itself.

Thanks and regards,
Raja

Re: Mload issue

Yes, I figured that there was a issue with the layout I defined. I changed it and is working fine now.

Anyways, thanks to every one!