Solved

How to get dspusrprf <user> to VB

Posted on 2010-11-15
4
787 Views
Last Modified: 2012-05-10
Hi,

Can anyone help me to get the output of dspusrprf <user>  on as400 green screen to VB program,  I was trying to get this via Client Access Express (CWBX) but unable to get the output.

Regards
Shaminda
0
Comment
Question by:PMS-ICT
[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 Comments
 
LVL 35

Accepted Solution

by:
Gary Patterson earned 250 total points
ID: 34139494
Sure.  Just specity the OUTPUT(*OUTFILE) option and the OUTFILE parameter to redirect output from this command to a database file.  Then query the file in your VB application using SQL (ODBC / ADO / ADO.NET)

http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/index.jsp?topic=/cl/dspusrprf.htm

DSPUSRPRF USRPRF(MYPROFILE) OUTPUT(*OUTFILE) OUTFILE(mylib/myfile)

- Gary Patterson
0
 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 250 total points
ID: 34139635
See the  cwbsoprf.h, cwbsousr.h and cwbsousg.h interface definitions for the System i Access cwbsoapi.dll in the Programmer's Toolkit. The Programmer's Toolkit is an install option of System i Access. If installed, access it through Start-> Programs-> IBM System i Access for Windows-> Programmer's Toolkit.

When opened, review the C/C++ APIs subtopic of the System i Operations topic.

It might be easier simply to code a program on AS/400 that returns the user profile attributes when you call it from VB.

Tom
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34949764
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 8 hours left to enroll

635 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