home *** CD-ROM | disk | FTP | other *** search
/ 203.33.198.31 / ftp-203.33.198.31.7z / 203.33.198.31 / psma1103gl0 < prev    next >
Encoding:
Text File  |  2009-04-20  |  2.6 KB  |  68 lines

  1. |******************************************************************************
  2. |* tssma1103gl  0  VRC B40C c4 gbc1
  3. |* tssma110 3gl
  4. |* kingsley
  5. |* 23-08-08 [16:16]
  6. |******************************************************************************
  7. |* Script Type: 0
  8. |******************************************************************************
  9.                                                                                 
  10. table ttssma110
  11.  
  12. function main()
  13. {
  14.  
  15. long comp,seq.id,seq.id1,count1,applock,ret,seq.id2,seq.id3
  16. String ftpshell(500)
  17. comp=lval(argv$(1))
  18.  
  19.     count1 = 0
  20.     
  21.     String str(500),str1(100),str2(100),str3(100),file.path(50),file.path1(50),file.path2(50),file.path3(50)
  22.     file.path = argv$(2)&"/tssma110"&str$(comp)&"1"
  23.     file.path2 = argv$(2)&"/tssma110"&str$(comp)&"2"
  24.     file.path3 = argv$(2)&"/tssma110"&str$(comp)&"3"
  25.     file.path1 = argv$(2)&"/tssma110"&str$(comp)&"3.log"
  26.     
  27.     seq.id = seq.open(file.path,"w")
  28.     seq.id2 = seq.open(file.path2,"w")
  29.     seq.id3 = seq.open(file.path3,"w")
  30.     seq.id1 = seq.open(file.path1,"w")
  31.     str1 =dte$()
  32.     select    tssma110.cloc,tssma110.cuno,tssma110.telp,tssma110.tefx,tssma110.care,tssma110.cceb,tssma110.emno,tssma110.refe,tssma110.pstc,tssma110.creg,tssma110.desc,tssma110.plan,tssma110.wsts,tssma110.telx
  33.     from    tssma110
  34.     where    tssma110._compnr = :comp
  35.     and    tssma110._index1 inrange {""} and {"ZZZZZZZZZZ"}
  36.     selectdo
  37.         count1 = count1 + 1
  38.         str = concat$("^",tssma110.cloc,tssma110.cuno,tssma110.telp,tssma110.tefx,tssma110.telx,tssma110.care,tssma110.cceb,tssma110.emno,tssma110.refe,tssma110.pstc,tssma110.creg,tssma110.wsts,tssma110.desc,tssma110.plan)
  39.         if (count1 < 800000) then
  40.             seq.puts(str,seq.id)
  41.         else
  42.             if (count1 < 1600000) then
  43.                 seq.puts(str,seq.id2)
  44.             else
  45.                 seq.puts(str,seq.id3)
  46.             endif    
  47.         endif
  48.         
  49.     endselect    
  50.     seq.close(seq.id)
  51.     seq.close(seq.id2)
  52.     seq.close(seq.id3)
  53.     str2 = dte$()
  54.     str3 = concat$("|",str1(1;2)&str1(5;2)&str1(3;2)&" "&str1(7;2)&":"&str1(9;2)&":"&str1(11;2),count1,str2(1;2)&str2(5;2)&str2(3;2)&" "&str2(7;2)&":"&str2(9;2)&":"&str2(11;2),"tssma110",comp)
  55.     seq.puts(str3,seq.id1) 
  56.     seq.close(seq.id1)
  57.     ftpshell = "sh /mna/baan/bse/nbin/BaanCustShells/webbatch3glftp.sh "&argv$(2)&" "&argv$(3)&" "&argv$(4)&" "&argv$(5)&" "&argv$(6)&" "&argv$(1)&"1"  
  58.     ret = shell(ftpshell,64)
  59.     ftpshell = "sh /mna/baan/bse/nbin/BaanCustShells/webbatch3glftp.sh "&argv$(2)&" "&argv$(3)&" "&argv$(4)&" "&argv$(5)&" "&argv$(6)&" "&argv$(1)&"2"  
  60.     ret = shell(ftpshell,64)
  61.     ftpshell = "sh /mna/baan/bse/nbin/BaanCustShells/webbatch3glftp.sh "&argv$(2)&" "&argv$(3)&" "&argv$(4)&" "&argv$(5)&" "&argv$(6)&" "&argv$(1)&"3"  
  62.     ret = shell(ftpshell,64)
  63.  
  64.  
  65.  
  66.  
  67. }
  68.