Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Change as400 user profile status via VB

Posted on 2010-11-12
2
Medium Priority
?
1,437 Views
Last Modified: 2012-05-10
Hi,

I'm trying to use below code to execute and change as400 user profile status from a web page, But i'm getting a error message, can anyone help to fix this code,

Dim system As New cwbx.AS400System()
        On Error GoTo failed
        Dim YOUR400 As New cwbx.AS400System
        Dim servers As New cwbx.SystemNames
        Dim Command As New cwbx.Command

        'YOUR400.Define(servers.DefaultSystem)
        Command.system = YOUR400

        ' Enter USERID and PWD so the users will not be prompted
        Command.system.Define("as400")
        Command.system.UserID = "qsecofr"
        Command.system.Password = "xxxxxx"
        Command.system.IPAddress = "xx.xx.xx.xxx"

        ' Run any valid 400 command from VB
        Command.Run("CHGUSRPRF USPRPF(user11) STATUS(*ENABLED)")

        Exit Sub
failed:
        MsgBox("AS/400 User Account Status Change Failed")
0
Comment
Question by:PMS-ICT
2 Comments
 
LVL 10

Accepted Solution

by:
Chad Smith earned 2000 total points
ID: 34121317
You have misspelled USPRPF it should be USRPRF
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 34121376
What is the error?  
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

916 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