Solved

Change as400 user profile status via VB

Posted on 2010-11-12
2
1,427 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
[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
2 Comments
 
LVL 10

Accepted Solution

by:
Chad Smith earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

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