===============================================
SEARCH400.COM DEVELOPER TIP
July 5, 2001
More developer tips at 
http://search400.techtarget.com/tipsIndex/0,289482,sid3_tax2f9,00.html
===============================================
SPONSORED BY: ARCAD
===============================================
How up to date is your AS/400 technical DOCUMENTATION? 
ARCAD Observer is a unique and powerful AS/400 solution 
offering a completely automated technical documentation 
process of your AS/400 applications. This highly 
configurable and graphical software instantly generates 
technical documentation directly on your PC. The FREE, 
fully functional NEW AS/400 Source Code Analyzer for RPG, 
COBOL & ILE is available to the first 500 ARCAD site 
visitors at http://www.arcadsoftware.com/ 

Contact Eric at (978) 927-2931 in the U.S. and Canada.
===============================================
FTP synchronizes passwords
By Graeme Dobie, search400 member

This tip makes it easy to work with passwords on multiple 
systems. We're looking for tips like this from a variety 
of sources. You probably have some from your experience, 
and can easily submit one at 
http://search400.techtarget.com/tipsSubmit/1,289485,sid3,00.html

It's a pain if you have to perform a regular task on 
several systems, such as synchronize passwords. By using 
FTP (in this case on an NT command prompt), one can 
create scripts 'on the fly' and reduce the overhead. 
These routines presume the password is already the same 
on all specified systems. 

*** PLEASE NOTE *** 

Even though these routines clean up after themselves, it 
may still be possible to recover the deleted files after 
use. 

USE; GROUP_P user_id current_password new_password 
By changing the line, echo quote rcmd chgusrprf %2 
password(%4)>>script1.scr other commands can be run, 
e.g.. STRSBS SBS(QINTER) ? 

However, remember these commands are effectively 
submitted to a batch stream, so don't try accessing 
anything in library QTEMP! 

The user should have command line authority, and 
authority to the OS/400 commands used. The FTP servers 
should be running. It goes without saying that you should 
regularly review your user's authority and access 
*especially* if you have any of the more common daemons 
running.

Code:

GROUP_P.BAT source code (modify system1 system 2 etc for 
valid hosts) @echo off 
call password.bat system1 %1 %2 %3
call password.bat system2 %1 %2 %3


echo passwords changed for user %1

PASSWORD.BAT source
@echo off
if exist script1.scr del script1.scr>nul

if exist temp.bat del temp.bat>nul


echo open %1>script1.scr
echo %2>>script1.scr
echo %3>>script1.scr

echo quote rcmd chgusrprf %2 password(%4)>>script1.scr
echo quit>>script1.scr

echo ftp -s:script1.scr>temp.bat
echo del script1.scr>>temp.bat
temp.bat

del script1.scr>nul
echo password changed for system %1  user %2

================================ 
OTHER DEVELOPER TIPS 
================================ 

Search400 members also submitted the following developer 
tips recently: 

Was the function cancelled?
Submitted by Thomas Liotta 
http://search400.techtarget.com/tip/1,289483,sid3_gci751899,00.html

Get a command line via the attention key
Submitted by Jerald Horner 
http://search400.techtarget.com/tip/1,289483,sid3_gci751907,00.html

Advanced usage of SEU
Submitted by Denny Davis 
http://search400.techtarget.com/tip/1,289483,sid3_gci751807,00.html
                                                                     
Data transfer S/36 files
Submitted by Cathal Hickey
http://search400.techtarget.com/tip/1,289483,sid3_gci751743,00.html

======================================================== 
COMMENTS AND FEEDBACK
======================================================== 

Did you like these tips? Let us know. You can e-mail us 
at mailto:[EMAIL PROTECTED] with fulsome praise; it will 
boost our ego. (You can also mail your gripes, too, if 
you insist.) Or go to our Developer tips page at 
http://search400.techtarget.com/tipsIndex/0,289482,sid3_tax2f9,00.html to rate 
them.

You may also post your comments in our live Discussion 
Forums at 
http://search400.discussions.techtarget.com
 
-------------------------------------
FEATURED BOOK
-------------------------------------

Title: The MC Press Desktop Encyclopedia of Tips, Techniques, and 
Programming Practices for iSeries and AS/400    
Authors: Ted Holt and Shannon O'Donnell 
Description: This book includes more than 900 entries by more than 
300 experts from around the world. These entries address practically 
every area of your job: RPG, CL, operations, security, database, 
TCP/IP and more. You'll find answers to questions about day-to-day 
programming and operations tasks, as well as techniques for 
accomplishing rare challenges. If you do anything at all on the 
iSeries or the AS/400, you will find this book and companion CD-ROM 
to be the most helpful reference you own.
http://www.digitalguru.com/dgstore/product.asp?isbn=1583470263&ac_id=55

======================================================== 
If you would like to sponsor this or any techtarget 
newsletter, please contact Gabrielle DeRussy at 
mailto:[EMAIL PROTECTED].
======================================================== 



If you no longer wish to receive this newsletter simply reply to 
this message with "REMOVE" in the subject line.  Or, visit 
http://search400.techtarget.com/register 
and adjust your subscriptions accordingly. 

If you choose to unsubscribe using our automated processing, you 
must send the "REMOVE" request from the email account to which 
this newsletter was delivered.  Please allow 24 hours for your 
"REMOVE" request to be processed.

Reply via email to