Solved

How to get dspusrprf <user> to VB

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Looking for VB6 code to read SQL table export it to ascii 8 43
Spell Check in VB6 13 126
IBM i Break Messages 1 10
adding "ungroup sheets" to existing vbs code 5 28
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

808 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