Solved

Attachmate Extra! - Capture Incoming Data to a .txt file by Macro

Posted on 2008-10-07
10
1,854 Views
Last Modified: 2012-05-05
I'm trying to write a MACRO for EXTRA! that will capture an incoming data stream to a file directly. Although I can do this using the Capture incoming data function on the menu option, what is the way to initiate and then terminate the capture through the macro?

My data can be several pages long at times. I have read other items on the GetArea but not sure if that is what I am looking for if there is another way.
0
Comment
Question by:vzdog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 22661094
Have you tried using the ReceiveFile method? From the Extra help:

Applies To Objects

Session

Description

Receives a file from the host.

Syntax

object.ReceiveFile [PCFile] [, HostFile] [, bQuiet]
-or-
rc = object.ReceiveFile( [PCFile] [, HostFile] [, bQuiet] )
-or-
Set waitobj = object.ReceiveFile( [PCFile] [, HostFile] [, bQuiet] )

Element      Description
object      The Session object.
PCFile      The name of the file after it is transferred to the PC.
HostFile      The name of the file to transfer from the host.
bQuiet      Boolean value indicating whether the file transfer "status" dialog box should be displayed during the transfer. Default is TRUE.
rc      Return value for second syntax form above. TRUE if the transfer was successful, FALSE if the specified file cannot be located, user canceled out of Transfer dialog box, or the file transfer was unsuccessful for any reason.
Set      The Set statement, required for assigning an object reference to a variable.
waitobj      A wait-type object.
Comments

If you do not specify HostFile or PCFile, the Transfer dialog appears in which you can select the files.  Note that the SendFile and ReceiveFile Methods do not support FT5250 (SQL) file transfers. They do support 3270 IND$FILE transfers and FTP file transfers (using any host).
When either of the first two syntax forms above is used, ReceiveFile will suspend execution of your macro or program (i.e. wait) until the file is received, or a timeout or error occurs. If the third form is used, ReceiveFile will return immediately and the wait-type object returned can be used with the Waits collection, which allows several separate events to be monitored simultaneously. For more information on this, see help for the Waits object.

© 1996 - 2004, Attachmate Corporation. All rights reserved.

Kevin
0
 

Author Comment

by:vzdog
ID: 22661139
Kevin,

I am not sure this would work. The file does not actually exists on the host.
I am sending a "command" or "query" to a server that creates the report I am pulling.

This Attachmate session merly provides a path to the host,  maon reason is we do not have open telnet access. So I truly need to capture the data as it is scrolling back on the screen.

Make sense?
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 22661211
It has been a year since I last worked with Xtra and I don't have access now so I'm at a disadvantage.

Perhaps you can use CaptureSetup to define the capture file and then set Capture to True.

Kevin
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 1

Expert Comment

by:MXAnderson
ID: 22793428
When the data scrolls onto the screen does it stop at each full page for you to hit a key to continue?
0
 

Author Comment

by:vzdog
ID: 22795729
Hello MXAnderson

No it does not stop or requir anu input. It displays the entire record(s).
0
 
LVL 1

Expert Comment

by:MXAnderson
ID: 22798266
OK, so is there a wait symbol in the bottom-left hand corner that flickers while the records scroll in? If there is, then you could run multiple getstring methods followed by the waitforhostquiet method. Are there any screen shots that you could provide (with any sensitive data blanked out, of course)?

Wait.bmp
No-Wait.bmp
0
 

Author Comment

by:vzdog
ID: 22798770
No Wait sysmbol displayed. it simply scrolls the data until end of data.
Basically my session shows the same type of info as yours does @ the bottom(ie Connection Num time)
0
 

Author Comment

by:vzdog
ID: 22995334
No real solution ever provided...
0
 
LVL 1

Expert Comment

by:MXAnderson
ID: 23001377
Sorry, vzdog! This is really beyond the scope of my knowledge of Attachmate.
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 23001554
I strongly suggest calling the Attachmate support folks.

Kevin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question