Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Hybrid Cloud Core×

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Get the host name or IP address of the Scan Machine

270005CQ8H gravatar image
Question by geethajini  (168) | Jan 29, 2015 at 12:14 PM datacapipscanhostnameaddressmachine

Hi,

We are using scancl.aspx for scanning (Datacap 8.1). We have configured ADSI authentication for scaning.

I can get the scan operator's ID from the ScanOperator variable.

We need the Host name or IP Address of the scan operator. How can we get it? Do we have any smart parameter for getting the host name or IP address of the scan machine?

thanks,

Geetha

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

12 answers

  • Sort: 
270005H566 gravatar image
Accepted answer

Answer by PankajKD (51) | Feb 06, 2015 at 02:25 PM

Under WindowsOn_Load()

Dim HostName

Set HostName=CreateObject("WinNTSystemInfo")

'After oNode Object creation add below code

Set bVar=oNode.selectSingleNode("V[@n='ScanningHostName']")

If bVar is not Nothing then

bVar=HostName.ComputerName 'static variable already created

Else 'Create Variable

Set bVar=xF.createElement("V")

Call bVar.setAttribute("n", "ScanningHostName")

Set bVar=oNode.AppendChild(bVar)

bVar.text = HostName.ComputerName

End If

~Pankaj

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270004AD82 gravatar image

Answer by MoizQ (2966) | Jan 29, 2015 at 04:31 PM

I don't think it's feasible OOTB. If you have a start batch panel then you can use client-side scripting to populate a field with the corresponding value within a custom panel. That would be the direction I would explore; you should be able to disable modification of the field using ReadOnly variable.

(I don't recall if TM8.1 FP2 OOTB has a defect with custom panel usage in scanning; it is supported, however, so if there's any issue then you can either wait for FP3 or request a test module depending on urgency.)

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005CQ8H gravatar image

Answer by geethajini (168) | Jan 30, 2015 at 06:16 AM

Thanks for reply MoizQ. I wanted to know if we have a smart parameter to get the IP address because I can see the IP address in Job Monitor tab-> Web Monitor.

We have 7 other fields in start batch panel where the user has to enter data. I don't know how to hide a field in start batch panel.

Hence, I am trying to write a custom action in dotnet which would get the machine name of scan operator and write it to a variable. Adding this profile to MainTaskProfile of scan task. Need to check if this works.

thanks,

Geetha

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270004AD82 gravatar image

Answer by MoizQ (2966) | Jan 30, 2015 at 03:17 PM

No, there is no such Smart Parameter. I do not see how you can obtain a web client's IP address within rules execution.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005H566 gravatar image

Answer by PankajKD (51) | Feb 04, 2015 at 01:20 AM

Hi Geetha,

Datacap Login page by default takes the host name as station ID.

What you need to do is save same value in Batch variable in Scanl.aspx page.

You can create variable on run time if it doesn't exist or you can create static variable at batch level

Hope this is what you were looking for

Thanks and Regards

Pankaj

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005CQ8H gravatar image

Answer by geethajini (168) | Feb 04, 2015 at 04:17 AM

Hi Pankaj,

Datacap by default writes the StationID to a batch level variable ScanStation.

We have configured ADSI authentication. we see that the user has to provide a station id which is available in the list of stations for logging in.

If we want the scan operator's host name, then we would need to add the host name to stations list. But the scan operator can still login with any other stationid which is present in the list.

What is the type of authentication you are using?

thanks,

Geetha

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005H566 gravatar image

Answer by PankajKD (51) | Feb 04, 2015 at 02:34 PM

Hi Geetha,

Datacap by default takes Host name as Station but users login by using station available in station list for eg:1,2,3

User can still login by any available station or hide the station option and default to 1 in default.aspx file.

After that write a code in windows_onload() of scanl.aspx file like in default.aspx file

Create WshNetwork object and access computer name and pass it to batch level variable(static or dyanmic)

Note:You don't need Datacap Station ID for any authentication except Datacap Taskmaster Authentication.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005CQ8H gravatar image

Answer by geethajini (168) | Feb 06, 2015 at 08:26 AM

As you said, I am not able to get scan machine's host name or ip address within rules execution.

thanks,

geetha

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005CQ8H gravatar image

Answer by geethajini (168) | Feb 06, 2015 at 08:32 AM

thanks for reply Pankaj.

Can you please tell, how we can pass a value to batch level variable(static or dynamic) from scancl.aspx.

Can you please share code snippets.

I have a requirement to get the machine name or IP address of the scan machine.

thanks,

geetha

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270005CQ8H gravatar image

Answer by geethajini (168) | Feb 09, 2015 at 05:12 AM

Thanks a lot Pankaj.

I will try your code.

Regards,

Geetha

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • 1
  • 2
  • ›

Follow this question

102 people are following this question.

Answers

Answers & comments

Related questions

Announcement: QVM Externally Hosted Scans (March 1st - power outtage) 0 Answers

Showing Networkinformation that is used by itm 2 Answers

Colored image gets corrupt when exported after using C2BW function 2 Answers

Datacap Navigator unable to save the scanned image at verify task 0 Answers

IMAM: lists of bridges available not consistent 1 Answer

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges