Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
CHKUSER - Check User Against List of Users
has no ratings.
Published: 24 Jul 2013
Revised: 26 Jul 2013 - 2036 days ago
Last viewed on: 20 Feb 2019 (3292 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

CHKUSER - Check User Against List of Users Published by: Bob Cozzi on 24 Jul 2013 view comments(5)

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: Paulster
Premium member *
Sweden and The Netherlands
Comment on: CHKUSER - Check User Against List of Users
Posted: 5 years 6 months 30 days 12 hours 19 minutes ago

...why not a table with users rather than the list on the command? SQL the current user against the list and you're ready.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: CHKUSER - Check User Against List of Users
Posted: 5 years 6 months 30 days 4 hours 3 minutes ago

Since when can we effectively use SQL inside of CL?

Posted by: GFuste
Premium member *
Jacksonville, FL
Comment on: CHKUSER - Check User Against List of Users
Posted: 5 years 6 months 30 days 3 hours 3 minutes ago

You could always try reading a file of users in CL as well.

Posted by: Paulster
Premium member *
Sweden and The Netherlands
Comment on: CHKUSER - Check User Against List of Users
Posted: 5 years 6 months 29 days 13 hours 8 minutes ago

Bob: Didn't know CL was a requirement. And since we're on the RPG forum here...   :o)

If it was a Q&D job I'd go for reading the file in a CL as GFuste suggests - nothing wrong with that in the right situation - 10/15 minutes and youä're up and running. But if you want to do a nicer job, RPG and SQL does seem the answer.

In any case, I'd never have a command with a list of potentially 50 users.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: CHKUSER - Check User Against List of Users
Posted: 5 years 6 months 29 days 3 minutes ago

It's probably just a taste issue. I don't like to creat extra objects (such as files) for CL routines. I'd prefer to pass in a list of arguments and control it that way. Then each CL program that also needs similar function can use the routine--rather than include some Program Name field in a file and then having to manage it.