Advertisement

03.07.2008 at 11:54AM PST, ID: 23223905
[x]
Attachment Details

How do I determine if a field is protected or unprotected in a 3270 emulation session through VBA?

Asked by CMCONE in Access Coding/Macros, VB Objects, VB Script

Tags:

I use VBA to work with a TN3270 emulation session.  I would like to look at a field on a screen and determine if it is protected or not.  If it's not protected, I will write data to that field.  I have managed to make it work through the macro software provided with the emulation software; however, I can not seem to get to work with VBA.  Below is how I connect to the 3270 session.

Dim Session As New atmsession
Dim Screen As New atmscreen3270
Dim Connection As Object
Dim Model As ATM_3270_MODEL

Set Session = New atmsession
Set Screen = New atmscreen3270

Session.Screen = Screen
Forms![Systems Applications].AtmTerminal1.Session = Session

Set Connection = CreateObject("atm.con.tn3270")
Connection.UseTN3270E = True

Session.Screen.Model = ATM_3270_MODEL_5
Connection.RemoteHostAddress = "XXX.XXX.XXX.XXX"
Connection.DestinationPort = XXXX
Connection.ResourceName = "#XXXXCCC"
Connection.TimeOut = 15
Forms![Systems Applications].AtmTerminal1.Session.Connection = Connection
Forms![Systems Applications].AtmTerminal1.Session.Connect 0

'This is the code that worked in the macro editor with the emulation software:

attr1 = session.screen.feldattribute(7, 7)

if attr1 = 240 or attr1 = 249  then
 msgbox ("Field is protected")
else
 session.screen.putstring "XXXX",7,7
 session.screen.waithostquiet 1000, -1
end ifStart Free Trial
 
Loading Advertisement...
 
[+][-]03.10.2008 at 04:21PM PDT, ID: 21091479

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 02:53PM PDT, ID: 21111180

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 06:15PM PDT, ID: 21112520

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 05:54AM PDT, ID: 21115653

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 03:20PM PDT, ID: 21121386

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 01:47PM PDT, ID: 21129392

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2008 at 03:46PM PDT, ID: 21138876

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 07:22PM PDT, ID: 21637450

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 08:04PM PDT, ID: 21685834

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, VB Objects, VB Script
Tags: Access VBA Programming
Sign Up Now!
Solution Provided By: Computer101
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628