Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiply item select from a List 1

Status
Not open for further replies.

MyFlight

Technical User
Feb 4, 2002
193
I am trying to write a script that will accomplish the following:

Open a dialog box with 3 options: Instrument, Media, or Hardware.

once a button is selected (see above) a list box opens with predefined items is the list. The user tehn selects multiple items. These items are then transmitted to the system one at a time. Note there will be various Commmands both sent and received between items transmitted (i.e.a sub-routine).

Here is What I have so far.


proc main

integer Event
String szItem
String Instrument = "Mouse,Keyboard,File"
String Media = "MemoryCard,ZipDisk,FloppyDisk"
String Hardware = "Printer,Scanner,CDRW"

dialogbox 0 198 96 253 154 3 " Computer Input Device Selection"
pushbutton 100 20 7 100 24 "Instrument"
pushbutton 200 20 46 100 24 "Media"
pushbutton 300 135 6 100 24 "Hardware"
pushbutton 600 84 121 81 19 "Exit" CANCEL
enddialog
while 1
dlgevent 0 Event
switch Event
case 0
endcase
case 100
dlgdestroy 0 CANCEL ; Destroy the dialog box.
dialogbox 3 241 99 152 138 11 "Select The Instruments you want"
listbox 1 28 8 90 89 Instrument multiple szList sort
pushbutton 2 54 114 40 14 "&OK" OK DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1
endcase
case 2 ; Exit button selected
usermsg "`"%s`" selected!" szItem
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc



ANY SUGGESTIONS.
 
A little more Information.

I need to allow a user to select multile items from a list. Then store these items (Table Names) for trasmission at a later time. The complete list is about 20 items, the user can select those that they require.

Since this is for a Siemens PhoneMail Export function, I will need to send these Table Name one at a time, foloowed by the Receive file command (this I already have).

My problem is saving the items (Table Names) selected for later use.

I will when finished have main Dialogbox with 5 option buttons. depending on the button pressed a list of Export tables comes up. the user then selects the Tables he/she requires. the script will then proceed to export/download these tables.

If you need more information please let me know.
 
Can you post your current version of this script? I'm getting several compile errors with it and want to work with what you are at the moment (if you've made any changes).


aspect@aspectscripting.com
 
KNOB,

I was able to solve some of my problems here is the LISTBOX script I have. I think it looks pretty good, however if you have any suggestions??.

Next I need to link this script to my export script. So that the Tables selected in the 1st script are exported. Since the Number of Tables will be variable, I am unsure how to proceed. The Table names have been saved to a TEXT file called:
"C:\Temp Data Files\Raw Data\Temp Export Tables.txt"

My second Script works for exporting ONE table. When you need to export MULTIPLE Tables you just keep entering the TABLE names at the "Table ? " PROMPT. Once the last table is sent you just nned to enter a SemiColon to indicate there are no more tables to be entered. The system responds with a list of Tables you have selected. I have included a snapshot of how this works.

Any and all help you can provide will be greatly appreciated.

1st Script for selecting Tables to be EXPORTED:


#define WorkDir "C:\Temp Data Files\Raw Data\"
#define SaveDir "C:\Temp Completed Reports\"
#define sEnter "^M"
#define szSpace " "
;****************************************************************************************/
;* Procedure: Main() Called by: */
;* Last Modified: 01/14/2004 */
;* Purpose: */
;* */
;****************************************************************************************/

proc main
integer Event, iSystem, iLen, ivar, len
integer nItem = 0 ; Integer to indicate current file.
string szList, szNewItem
string fEnd = ".csv"
string sProfiles, sSystem, sCallProcess, sDlist, sNetwork, sComma, szItem
string fName2 = "Temp Export Tables.txt"
string sTok1, sLine

sProfiles = "SACT,AS,US,SMSGS,COS,DELCOS,DELUP"
sSystem = "SPCFG,SPBIL,SPNBIL,NPSTND,NPPBX,SASTAT,SSSTAT,SMSTAT,SOSTAT"
sCallProcess = "CPMENU,CPLO,CPLR"
sDlist = "DLIST"
sNetwork = "SN,NPROF,SPNBIL,NPN,NPSAN,NETSTS,NETSTU,NETSMT,NGSP,NLSP,NSS,COSOPT,NETP"
sComma = ","

dialogbox 100 198 96 253 154 3 " PhoneMail EXPORT Table Selection Screen "
pushbutton 101 20 7 100 24 "PhoneMail Box Exports"
pushbutton 102 20 46 100 24 "PhoneMail System Exports"
pushbutton 103 135 6 100 24 "Call Processing Exports"
pushbutton 104 136 46 100 24 "Distribution List Exports"
pushbutton 105 78 83 100 24 "PhoneMail Network Exports"
pushbutton 106 88 117 24 19 "OK" OK
pushbutton 107 122 118 50 19 "CANCEL" CANCEL
enddialog
while 1
dlgevent 100 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 100 ; No event occurred.
endcase
case 101 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sProfiles multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
fclose 2
endif
exitwhile
endcase
case 102 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sSystem multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
fclose 2
endif
exitwhile
endcase
case 103 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sCallProcess multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
fclose 2
endif
exitwhile
endcase
case 104 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sDlist multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
fclose 2
endif
exitwhile
endcase
case 105 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 166 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 112 sNetwork multiple szList sort
pushbutton 2 40 137 22 14 "&OK" OK
pushbutton 3 74 137 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
fclose 2
endif
exitwhile
endcase
case 106 ; Something was chosen.
exitwhile ; Exit the loop.
endcase
case 107 ; Something was chosen.
exitwhile ; Exit the loop.
endcase
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 100 CANCEL ; Destroy the dialog box.
endproc


2nd script for Exporting Tables:
I selected 3 Tables to be Exported: CPLO,CPLR,DLIST



proc main
integer iStatus
string NewItem, iTable ; Item selected from list.

when target 0 "Start Date [MM/DD/YY hh:mm" call Enter
when target 1 "Do you wish to send the file (Y/N)" call sYes

NewItem = iTable
sdlginput "Export Table" "Enter Table to be Exported:" iTable
waitfor "Login:" 30
execute "Log-SA.wax" ; This will LOG you into the PhoneMail System
waitfor "Function: " FOREVER
transmit "EXPORT^M"
waitfor "Destination ?" FOREVER
transmit "FILE^M"
waitfor "Table ?" 10
transmit iTable ;THIS IS THE DATA THAT COMES FROM THE listbox (textfile)
transmit "^M" ;AFTER EACH ENTRY NEED TO SEND AN ENTER AND THEN WAIT FOR
;THE NEXT "Table ?" PROMPT, AND THEN SEND THE NEXT ENTRY. WHEN
waitfor "Table ? " 10 ;ALL TABLES ARE ENTERED NEED TO SEND ";^M" TO INDICATE NO MORE TABLES
transmit ";^M" ;THE SYSTEM WILL RESPOND WITH A LIST OF ALL TABLES SELECTED FOR EXPORT
waitfor "Is this correct (y/n) ? " ;AND ASK "Is this correct (y/n)"
transmit "Y^M"
waitfor "The file will be transferred" FOREVER
transmit "^M"
waitfor "YMODEM receive."
getfile YMODEM
iStatus = $XFERSTATUS
while iStatus
yield
iStatus = $XFERSTATUS
endwhile
waitfor "Please enter valid password:" FOREVER
transmit $PASSWORD ;AFTER ALL TABLES HAVE BEEN RECEIVED THE SYSTEM WILL PROMPT FOR A PASSWORD
mspause 150 ;SEND $PASSWORD, THEN LOGOUT OF THE PHONEMAIL SYSTEM
transmit "^M"
waitfor "Function: " FOREVER
transmit "LOG^M"
waitfor "Action: " FOREVER
transmit "LOG^M"
hangup
endproc

proc Enter
Transmit "^M"
endproc

proc sYes
Transmit "Y^M"
endproc


3rd here is the Capture file for the above script:



Function: EXPORT
Wed Jan 14, 2004 10:12 AM

Export Data Utility Version 1.1

Querying Nodes.
.........
Node #1 has responded..
Node #2 has responded.
All nodes have responded.

Reading Export Table Configuration..
Destination ? FILE
Table ? CPLO
Start Date [MM/DD/YY hh:mm] ?
All records will be exported.
Table ? CPLR
Start Date [MM/DD/YY hh:mm] ?
All records will be exported.
Table ? DLIST
Start Date [MM/DD/YY hh:mm] ?
All records will be exported.
Table ? ;

Selected tables are :
CPLO DLIST

Is this correct (y/n) ? Y
Table selection finished.

Analyzing CPLO...
Approx. time to transfer on 1200bps Term port #6: 1 minute per 120 records
Approx. time to transfer on 9600bps Term port #4: 1 minute per 960 records

Gathering data......
Copying ...........

File Name : E:\SYS\CPLO00.TXT
File Size in Bytes: 2047
Block Size in Bytes: 1024
Total Blocks : 2
Approximate Transfer Time at 1200bps on Term port #6 (Min:Sec): 0:25
Approximate Transfer Time at 9600bps on Term port #4 (Min:Sec): 0:03
Do you wish to send the file (Y/N) : Y

The file will be transferred using the YMODEM BATCH protocol.
After reading this message, start the "Receive files using YMODEM BATCH
protocol" function in your local communications software.

If you are running PROCOMM press CTRL-ALT-4 and select YMODEM BATCH,
to transfer file from PhoneMail to the PC

Send Complete -- CPLO00.TXT
Analyzing CPLR...
Approx. time to transfer on 1200bps Term port #6: 1 minute per 120 records
Approx. time to transfer on 9600bps Term port #4: 1 minute per 960 records

Gathering data.....Node 1 has no data to export at this time.

..Node 2 has no data to export at this time.

...Analyzing DLIST...
Approx. time to transfer on 1200bps Term port #6: 1 minute per 120 records
Approx. time to transfer on 9600bps Term port #4: 1 minute per 960 records

Gathering data.........
Copying ......Node 2 has no data to export at this time.

File Name : E:\SYS\DLIST00.TXT
File Size in Bytes: 603
Block Size in Bytes: 1024
Total Blocks : 1
Approximate Transfer Time at 1200bps on Term port #6 (Min:Sec): 0:17
Approximate Transfer Time at 9600bps on Term port #4 (Min:Sec): 0:02
Do you wish to send the file (Y/N) : Y

The file will be transferred using the YMODEM BATCH protocol.
After reading this message, start the "Receive files using YMODEM BATCH
protocol" function in your local communications software.

If you are running PROCOMM press CTRL-ALT-4 to transfer file from PhoneMail to the PC

Send Complete -- DLIST00.TXT
Export exiting...done.

Please enter valid password:

Returning to the main System Administration menu
(this could take up to 5 minutes) ...

PhoneMail release 6.4.3.2

CPU Type of local node is 80386 33MHz.
PhoneMail (Node 1 of 2) is active with 16 Channels

Function: lo
Wed Jan 14, 2004 10:21 AM

Action: lo

Login:


AS ALWAYS YOU ASSISTANCE IS GREATLY APPRECIATED.
 
Sorry for not replying sooner, must not have noticed that this was updated before.

Probably the easiest way to get the data from one script to another would be to save the values in ASPECT's global variables, then have the first script launch the second script using the execute command. You could save the total number of tables to export in i0 for instance, then update the value of s0 with the name of each table you want to append. This would make s0 look something like this:

table1,table2,table3

You could use strtok to have the child script break this apart into each table and you will know how many tables to process in total since this value will be in i0.

The only limitation I can see on this is that a string in ASPECT is limited to 256 characters, but you would have to export quite a few tables to hit that limit (assuming the table names are roughly the same size as the tables you posted).


aspect@aspectscripting.com
 
KNOB,

Thanks for the Reply this is the Script as I currently have it. It seems to work however, sometimes I will get an error on the 2nd, 3rd, or 4th tables being exported. I believe this is a timing issue.

Any suggestions?


#define WorkDir "C:\Temp Data Files\Raw Data\"
#define SaveDir "C:\Temp Completed Reports\"
#define szNewItem ""
#define sEnter "^M"
#define szSpace " "
proc main
integer Event
integer nItem = 0 ; Integer to indicate current file.
string szList
string fEnd = ".csv"
string sProfiles, sSystem, sCallProcess, sDlist, sNetwork, sComma
string fName2 = "Temp Export Tables.txt"

sProfiles = "SACT,AS,US,SMSGS,COS,DELCOS,DELUP"
sSystem = "SPCFG,SPBIL,SPNBIL,NPSTND,NPPBX,SASTAT,SSSTAT,SMSTAT,SOSTAT"
sCallProcess = "CPMENU,CPLO,CPLR"
sDlist = "DLIST"
sNetwork = "SN,NPROF,SPNBIL,NPN,NPSAN,NETSTS,NETSTU,NETSMT,NGSP,NLSP,NSS,COSOPT,NETP"
sComma = ","

dialogbox 100 198 96 253 154 3 " PhoneMail EXPORT Table Selection Screen "
pushbutton 101 20 7 100 24 "PhoneMail Box Exports"
pushbutton 102 20 46 100 24 "PhoneMail System Exports"
pushbutton 103 135 6 100 24 "Call Processing Exports"
pushbutton 104 136 46 100 24 "Distribution List Exports"
pushbutton 105 78 83 100 24 "PhoneMail Network Exports"
pushbutton 106 88 117 24 19 "OK" OK
pushbutton 107 122 118 50 19 "CANCEL" CANCEL
enddialog
while 1
dlgevent 100 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 100 ; No event occurred.
endcase
case 101 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sProfiles multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
pause 1
fclose 2
endif
exitwhile
endcase
case 102 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sSystem multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
fclose 2
endif
exitwhile
endcase
case 103 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sCallProcess multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
pause 1
fclose 2
endif
exitwhile
endcase
case 104 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 156 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 103 sDlist multiple szList sort
pushbutton 2 40 130 22 14 "&OK" OK
pushbutton 3 73 130 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
pause 1
fclose 2
endif
exitwhile
endcase
case 105 ; Something was chosen.
dlgdestroy 100 CANCEL ; Destroy the dialog box.
chdir WorkDir
fopen 2 fName2 CREATE TEXT
dialogbox 0 264 99 150 166 11 " Select The TABLES you want Exported"
listbox 1 45 11 61 112 sNetwork multiple szList sort
pushbutton 2 40 137 22 14 "&OK" OK
pushbutton 3 74 137 40 14 "&CANCEL" CANCEL DEFAULT
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Something was chosen.
endcase
case 2
dlgsave 0 1
exitwhile
endcase
case 3
exitwhile
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
if nullstr szList ; Check to see if text is null.
fclose 2
else
fputs 2 szList
pause 1
fclose 2
endif
exitwhile
endcase
case 106 ; Something was chosen.
exitwhile ; Exit the loop.
endcase
case 107 ; Something was chosen.
exitwhile ; Exit the loop.
endcase
default ; Exit case chosen.
endcase
endswitch
endwhile
dlgdestroy 100 CANCEL ; Destroy the dialog box.
usermsg szList
pause 3
if nullstr szList ; Check to see if text is null.
exit
else
CALL EXPORT
endif
endproc
proc export
integer iStatus, iLen
string sTok1, sLine
when target 0 "Start Date [MM/DD/YY hh:mm" call Enter
when target 1 "Do you wish to send the file (Y/N)" call sYes
when target 2 "Please enter valid password" Call sPassword

waitfor "Login:" 30
execute "Log-SA.wax" ; This will LOG you into the PhoneMail System
waitfor "Function: " FOREVER
transmit "EXPORT^M"
waitfor "Destination ?" FOREVER
chdir WorkDir
; Opens Text File
fopen 1 "Temp Export Tables.txt" READWRITE TEXT
transmit "FILE^M"
fgets 1 sLine
while not feof 1
strlen sLine iLen
; Assigns Text in First Field (From Text File) to Variable sTok1.
strtok sTok1 sLine "," 1
strlen sTok1 iLen
if iLen <= 1
exitwhile ; If so, exit loop.
endif
waitfor &quot;Table&quot; 5
if SUCCESS
transmit sTok1
pause 1
transmit &quot;^M&quot;
else
exitwhile
endif
EndWhile
waitfor &quot;Table ? &quot; 5
transmit &quot;;^M&quot;
waitfor &quot;Is this correct (y/n)&quot;
transmit &quot;Y^M&quot;
waitfor &quot;The file will be transferred&quot; FOREVER
; transmit &quot;^M&quot;
; waitfor &quot;YMODEM BATCH&quot;
pause 10
getfile YMODEM
iStatus = $XFERSTATUS
while iStatus
yield
iStatus = $XFERSTATUS
endwhile
waitfor &quot;Export exiting...done&quot; 5
waitfor &quot;Function: &quot; FOREVER
transmit &quot;LOG^M&quot;
waitfor &quot;Action: &quot; FOREVER
transmit &quot;LOG^M&quot;
capture OFF
hangup
endproc

proc Enter
Transmit &quot;^M&quot;
endproc

proc sPassword
transmit $PASSWORD
mspause 150
transmit &quot;^M&quot;
endproc

proc sYes
Transmit &quot;Y^M&quot;
endproc
 
KNOB,

THE MESSAGE COMES FROM THE REMOTE SYSTEM

Selected tables are :
CPLO

Is this correct (y/n) ? y

Table selection finished.

Analyzing CPLO...
Approx. time to transfer on 1200bps Term port #6: 1 minute per 120 records
Approx. time to transfer on 9600bps Term port #1: 1 minute per 960 records

Gathering data......
Copying ......Node 2 has no data to export at this time.

....

File Name : E:\SYS\CPLO00.TXT
File Size in Bytes: 1603
Block Size in Bytes: 1024
Total Blocks : 2
Approximate Transfer Time at 1200bps on Term port #6 (Min:Sec): 0:25
Approximate Transfer Time at 9600bps on Term port #1 (Min:Sec): 0:03
Do you wish to send the file (Y/N) : Y

The file will be transferred using the YMODEM BATCH

Send incomplete -- Invalid Startup Sequence
E:\SYS\CPLO00.TXT was not sent.

Export error, contact your ROLM Service Provider.


Export exiting...done.

Please enter valid password:

EVERYTHING LOOK NORMAL EXECPT THE ITEMS MARKED IN BOLD.

IF THE FILE WAS TRANSFERRED CORRECTLY HERE IS WHAT YOU SHOULD SEE:


Reading Export Table Configuration..
Destination ? FILE
Table ? CPLO
Start Date [MM/DD/YY hh:mm] ?
All records will be exported.
Table ? ;

Selected tables are :
CPLO

Is this correct (y/n) ? Y

Table selection finished.

Analyzing CPLO...
Approx. time to transfer on 1200bps Term port #6: 1 minute per 120 records
Approx. time to transfer on 9600bps Term port #1: 1 minute per 960 records

Gathering data......
Copying ......Node 2 has no data to export at this time.

....

File Name : E:\SYS\CPLO00.TXT
File Size in Bytes: 1603
Block Size in Bytes: 1024
Total Blocks : 2
Approximate Transfer Time at 1200bps on Term port #6 (Min:Sec): 0:25
Approximate Transfer Time at 9600bps on Term port #1 (Min:Sec): 0:03
Do you wish to send the file (Y/N) :
Do you wish to send the file (Y/N) : Y

The file will be transferred using the YMODEM BATCH protocol.
After reading this message, start the &quot;Receive files using YMODEM BATCH
protocol&quot; function in your local communications software.

If you are running PROCOMM press =]9key; and select YMODEM BATCH,

Invalid password.

 
Sorry to take so long to look at this, I had printed off some of the thread to review then it got buried on my desk. I would try removing or cutting down the pause 10 command just prior to the getfile command. My hunch is that it may be too long for the transfer to get initialized and thus cause the remote system to abort the transfer.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top