• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 740
  • Last Modified:

Importing excel list into Client Access Macro

Hello -

I wondered if someone could assist.  I'm very much a beginner in programming but need to create a simple script/macro to enable passwords for a large list of profiles later this month, and rather than do them all individually, I'd like to create a macro that runs through the excel list of profiles and enables them.  

Any ideas?

Thanks!
0
TUN-IT
Asked:
TUN-IT
  • 8
  • 7
1 Solution
 
theo kouwenhovenCommented:
Hi TUN-IT,

If you only have to enable them, there are 2 easy options.
1. Create a CL with a line for every user (eventually generate it with Excel and upload or copy-paste) like
   CHGUSRPRF USRPRF(userid-1)    STATUS(*ENABLED)
   CHGUSRPRF USRPRF(userid-2)    STATUS(*ENABLED)
      etc.
-or-
2. Use the OS/400 benefits to do that
   - Type WRKUSRPRF
   - put option 2 infront of every user you like to enable
   - Type  STATUS(*ENABLED) on the command line
  - Press enter
Now all with 2 indicated profiles will be changed.

Regards,
Murph


0
 
TUN-ITAuthor Commented:
Hi Murphey,

Option 2 is out for me as I have restricted access on this box and can only use the command "Password", then F4, then I type in the username and have the option to type E for Enable, R for Reset, etc.  I don't have authority to use the CHGUSRPRF or WRKUSRPRF command.

I apologize for sounding so clueless but I just don't understand how to bring an Excel list into an AS/400 macro.  
0
 
theo kouwenhovenCommented:
DO you have experience in writing Excel macro's?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
TUN-ITAuthor Commented:
No, I don't.  Is it a simple menu function?
0
 
theo kouwenhovenCommented:
You can record a Macro with Client access.... look to the contents
and copy and paste it in the same file for each user.

or ask some guys from IT to solve it for you....
it's not such a thing like copy and paste from Excel to As/400

0
 
TUN-ITAuthor Commented:
I am IT, I just don't know how to create a Macro. I've already asked other members of my team and no one here has ever had to create one.  
0
 
theo kouwenhovenCommented:
You are IT and have no Access to that box?
0
 
theo kouwenhovenCommented:
do you program any language?
0
 
TUN-ITAuthor Commented:
I have access to the box but it is restricted.  The box houses multiple LPARs that house data for 6 different properties, and I only manage 3 of those 6.  
0
 
theo kouwenhovenCommented:
have you CL programming experience?
0
 
TUN-ITAuthor Commented:
No, I don't.  I've only ever used basic commands in the AS/400 - as well as the custom applications my company has built.  
0
 
theo kouwenhovenCommented:
Oke then we do it step by step.
- first do what you heve do to enable a user-ID
- type password +F4, fill user-ID and  'E' end press enter
Now you are back on the command line, press F9 to see your last command,
please note it down (copy past) and let me know what it is (was)

Murph


0
 
TUN-ITAuthor Commented:
PASSWORD PASSWORD(UTUXXXXX1) SETENB(E)
0
 
theo kouwenhovenCommented:
Make a text document named e.g. myMacro.MAC
include the lines from the Snippet in it.
When you are ready, you can execute that with the Client Access Macro.



Regards,
Murph

I assumed you use Client Access???
Description=
[wait app]
"PASSWORD PASSWORD(UTUXXXXX1) SETENB(E)
[Field+]
[ENTER]
[wait app]
"PASSWORD PASSWORD(UTUXXXXX2) SETENB(E)
[Field+]
[ENTER]
[wait app]
"PASSWORD PASSWORD(UTUXXXXX3) SETENB(E)
[Field+]
[ENTER]
etc etc etc 

Open in new window

0
 
TUN-ITAuthor Commented:
This was EXACTLY what I needed.  I had to mail merge my list in excel to word in order to fill in the profile names, but this saved me HOURS of work.  THANK YOU MURPHEY2!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now