Solved

How to get dspusrprf <user> to VB

Posted on 2010-11-15
4
776 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
4 Comments
 
LVL 34

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 142

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now