int myfile_w??myfile_r1??myfile_r2;
char *file_w="F:\test\w.txt";
char *file_r1="F:\test\r1.txt";
char *file_r2="F:\test\r2.txt";
long  text[1024];
char booking_no[30]="wjn";
char  *num_no=lr_eval_string("{unit_no}");
char ccl_file[1024]="TARGET_PATH=/ccl/send/";
lr_output_message("num_no: %s"??num_no);//?????? num_no ???
strcat(booking_no??num_no);
lr_output_message("booking_no: %s"??booking_no); //?????? booking_no ???
//??? ???? ????1-???file_r1??????????/д??file_w??  ????2-??booking_no????file_w??
myfile_r1=fopen(file_r1??"r");
myfile_w=fopen(file_w??"w");
while(!feof(myfile_r1))
{
fgets(text??1024??myfile_r1);
fputs(text??myfile_w);
}
fclose(myfile_r1);
fclose(myfile_w);
myfile_w=fopen(file_w??"a");
fprintf(myfile_w??"%s"??booking_no);
fclose(myfile_w);
ftp_logon_ex(&ftp_session??"ftp_logon"??"URL=ftp://usrname:password@192.168.1.11:21"??LAST);
strcat(ccl_file??booking_no);
strcat(ccl_file??".txt");
lr_output_message("ccl_f : %s"??ccl_file); //?????? ccl_file ???
ftp_put_ex(&ftp_session?? "Ftp_Put"??
"SOURCE_PATH=F:/test/w.txt"??
ccl_file?? ENDITEM??            LAST);
ftp_logout_ex(&ftp_session);
return 0;
-------
????????:  *num_no=lr_eval_string("{unit_no}");
?????? num_no ????в?????: unit number ?? ????1?? ???С?1000000 ????γ??????.
??????????? ???? 3??????? ???????? ccl_file??????? ??????????????? ?? booking_no ???????????????????.
??????????? :
booking_no        ccl_file        ???
2582545531        n1        booking_no ???? n1
n300000002wjn2        wjn2        booking_no ???? n2
n300000003        n3        booking_no ???? n3
2582545531        n100000001        booking_no ???? n100000001
n300000002wjn2        n100000002        booking_no ???? n100000002
n100000003        n100000003        booking_no ???? n100000003
2582545531        n200000001        booking_no ???? n200000001
n200000002        n200000002        booking_no ???? n200000002
n200000003        n200000003        booking_no ???? n200000003