Solved

Change as400 user profile status via VB

Posted on 2010-11-12
2
1,393 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 500 total points
ID: 34121317
You have misspelled USPRPF it should be USRPRF
0
 
LVL 34

Expert Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 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

20 Experts available now in Live!

Get 1:1 Help Now