Solved

How to get dspusrprf <user> to VB

Posted on 2010-11-15
4
780 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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