fhg
Volume 7, Number 30 -- August 22, 2007

Commands with Generic Parameters

Published: August 22, 2007

Hey, Ted:

A while back you posted a tip regarding DLTF with a generic file name. It works great! I needed to copy a physical file and its related logical files to another library. I decided to prompt the CRTDUPOBJ command and was delighted to find that the OBJ parameter can specify a generic name! The file names were similar, with a slight difference in their suffix, so I was able to duplicate multiple objects with one command. Lesson learned: prompt a command once in a while and read all the parameters. Something may have been missed or added in a newer release. I was also reminded that this old dog can still learn a new trick.

--Russ


Your email put me to wondering just what commands can process generic object names, Russ. On the V5R3 system on which I am presently working, I did the following:

First, I ran the following CL command to create an IFS directory to hold command documentation.

mkdir  '/home/tholt/CmdSource'

Second, I generated documentation for the i5/OS commands.

GENCMDDOC CMD(QSYS/*ALL) TODIR('/home/tholt/CmdSource')

When GENCMDDOC finally finished, the CmdSource directory was full of HTML files. I did not realize it at first, but the command was not finished running when the input inhibited indicator went off on my green-screen session.

Third, I got into the Qshell environment and ran this command:

find /home/tholt/CmdSource -exec grep 'Generic' 
{} \; -print | grep '^/home/tholt' | cut -c 28- |
  cut -f 1 -d '.' | sort > GenericCmds.Txt

There's nothing obvious about that command, so let me go through it one piece at a time.

find /home/tholt/CmdSource -exec grep 'Generic' {} \; -print

The find command executes the grep utility to look for files that contain the word Generic. It writes each line that contains the word to standard output. Now I have 21 megabytes of something like this:

<td valign="top"><i>Generic name, name</i>, *ALL</td> 
/home/tholt/CmdSource/QSYS_ADDBNDDIRE.HTML            
<td valign="top"><i>Generic name, name</i></td>       
/home/tholt/CmdSource/QSYS_DLTIPXD.HTML               
<td valign="top"><i>Generic name, name</i>, *ALL</td>               
/home/tholt/CmdSource/QSYS_RMVBNDDIRE.HTML                          
<i>Generic name, name</i>, *ANY</td>                                
<td valign="top"><i>Generic name, name</i>, <b><u>*ANY</u></b></td> 
<td valign="top"><i>Generic name, name</i>, <b><u>*ANY</u></b></td> 
/home/tholt/CmdSource/QSYS_RMVCFGLE.HTML                            

I only need the lines that contain the command name, so I use the grep utility to select only the lines that start with my directory name.

grep '^/home/tholt'

Now my data looks like this:

/home/tholt/CmdSource/QSYS_WRKPRB.HTML   
/home/tholt/CmdSource/QSYS_WRKPSFCFG.HTML
/home/tholt/CmdSource/QSYS_WRKQMFORM.HTML

I don't need the directory name on the front, or the .HTML extension on the end, so I can remove them with the cut utility.

cut -c 28- |  cut -f 1 -d '.'

And then I sort the list into file GenericCmds.Txt.

sort > GenericCmds.Txt

Here's what I came up with for V5R3.

ADDALRSLTE
ADDAUTLE
ADDBNDDIRE
ADDCFGLE
ADDCMNE
ADDDSTRTE
ADDPEXDFN
ADDPRBSLTE
ADDRPYLE
ADDWSE
ANZUSROBJ
CHGALRSLTE
CHGAUTLE
CHGCDEFNT
CHGCFGL
CHGCMNE
CHGDSPF
CHGFCNARA
CHGMOD
CHGMSGF
CHGMSGQ
CHGOBJAUD
CHGOBJD
CHGPEXDFN
CHGPGM
CHGPRBSLTE
CHGPRTF
CHGSECAUD
CHGSRVPGM
CHGSYSDIRA
CHGSYSVAL
CHGS36MSGL
CHGWSE
CHKOBJITG
CPROBJ
CPYF
CPYSRCF
CPYTODKT
CPYTOTAP
CRTCFGL
CRTDUPOBJ
CRTFCNARA
CRTPGM
CRTSRVPGM
CVTCLSRC
CVTRPGSRC
CVTTCPCL
DCPOBJ
DLTALRTBL
DLTAUTL
DLTBNDDIR
DLTCFGL
DLTCLD
DLTCLS
DLTCMD
DLTCNNL
DLTCOSD
DLTCRQD
DLTCSI
DLTCTLD
DLTDEVD
DLTDTAARA
DLTDTAQ
DLTF
DLTFNTRSC
DLTFORMDF
DLTFTR
DLTGSS
DLTIGCDCT
DLTIPXD
DLTJOBD
DLTJOBQ
DLTJRN
DLTJRNRCV
DLTLIND
DLTMEDDFN
DLTMGTCOL
DLTMNU
DLTMOD
DLTMODD
DLTMSGF
DLTMSGQ
DLTNODGRP
DLTNODL
DLTNTBD
DLTNWID
DLTNWSD
DLTOUTQ
DLTOVL
DLTPAGDFN
DLTPAGSEG
DLTPDG
DLT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TR
WRKGSS
WRKIMGCLG
WRKIPXD
WRKJOBD
WRKJOBQ
WRKJOBSCDE
WRKJRNRCV
WRKLIB
WRKLIBPDM
WRKLIND
WRKMBRPDM
WRKMLBSTS
WRKMNU
WRKMOD
WRKMODD
WRKMSGF
WRKMSGQ
WRKNODL
WRKNTBD
WRKNWID
WRKNWSD
WRKNWSENR
WRKNWSSTG
WRKOBJ
WRKOUTQ
WRKOVL
WRKPAGDFN
WRKPAGSEG
WRKPGM
WRKPNLGRP
WRKPRB
WRKPSFCFG
WRKQMFORM
WRKQMQRY
WRKRDBDIRE
WRKREGINF
WRKSBSD
WRKSCHIDX
WRKSPADCT
WRKSRVPGM
WRKSYSVAL
WRKTBL
WRKTIMZON
WRKUSRPRF
WRKWTR

I suspect many of us can scan that list and find a command that we did not know would take a generic parameter.


--Ted


RELATED STORY

Deleting with a Generic File Name



                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
HELP/SYSTEMS

SEQUEL can be used for
virtually ALL business intelligence functions
on the System i, including:

                                                    · Executive Dashboards
                                                    · Graphical Query & Reporting
                                                    · Drill-Down Data Analysis
                                                    · Multi-Platform Database Support
                                                    · E-Mail Report and File Distribution
                                                    · Secure Web Access

SEQUEL is the single solution for all
your business intelligence needs.

www.helpsystems.com


Senior Technical Editor: Ted Holt
Technical Editors: Howard Arner, Joe Hertvik, Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Brian Kelly, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

COMMON:  Join us at the annual 2008 conference, March 30 - April 3, in Nashville, Tennessee
Computer Keyes:  KeyesOverlay rapidly converts standard *SCS printer files into PDF documents
Bytware:  Simplify and strengthen your System i security with object-based solutions


 

IT Jungle Store Top Book Picks

The System i Pocket RPG & RPG IV Guide: List Price, $69.95
The iSeries Pocket Database Guide: List Price, $59.00
The iSeries Pocket Developers' Guide: List Price, $59.00
The iSeries Pocket SQL Guide: List Price, $59.00
The iSeries Pocket Query Guide: List Price, $49.00
The iSeries Pocket WebFacing Primer: List Price, $39.00
Migrating to WebSphere Express for iSeries: List Price, $49.00
iSeries Express Web Implementer's Guide: List Price, $59.00
Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00
WebFacing Application Design and Development Guide: List Price, $55.00
Can the AS/400 Survive IBM?: List Price, $49.00
The All-Everything Machine: List Price, $29.95
Chip Wars: List Price, $29.95


 
The Four Hundred
i5/OS V6R1: The TIMI, It Is A-Changing

Solaris Coming to the System i?

The System i Gets Price Changes and Withdrawals

As I See It: Of Toads and Time

The Linux Beacon
Intel Cranks Out Two More Quads, AMD Sets Barcelona Date

Tilera Launches 64-Core, Linux-Based Mesh Processor

Citrix Buys Virtualization Challenger XenSource for $500 Million

Court Says Novell Owns Unix, Not SCO

Four Hundred Stuff
Is PHP the Systems i's Next RPG?

Notes/Domino 8 Hits the Streets

450,000-Line RPG App Converted to .NET in Six Months

CA Extends Change Management to i5/OS

Big Iron
Solaris Unix Is Coming to IBM Mainframes

Top Mainframe Stories From Around the Web

Chats, Webinars, Seminars, Shows, and Other Happenings

System i PTF Guide
August 11, 2007: Volume 9, Number 32

August 4, 2007: Volume 9, Number 31

July 28, 2007: Volume 9, Number 30

July 21, 2007: Volume 9, Number 29

July 14, 2007: Volume 9, Number 28

July 7, 2007: Volume 9, Number 27

The Windows Observer
AMD Gooses Dual-Core Opteron Speeds, Cuts Prices

IIS Gains More Web Server Market Share, Says Netcraft

NEC Brings Linux, Windows Clustering Software to North America

Unisys First Up with TPC-E Benchmark Test

The Unix Guardian
Sun Polishes Up Sparc T2 Multithreaded Chips

AMD Gooses Dual-Core Opteron Speeds, Cuts Prices

Sun Creates Virtual Tape Library from Thumper Server

As I See It: Policeware

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

THIS ISSUE SPONSORED BY:

WorksRight Software
Help/Systems
Krengeltech


Printer Friendly Version


TABLE OF CONTENTS
If the Compiler Can't Find the Mistake, Maybe You Can

Commands with Generic Parameters

Troubleshooting NetServer File Copy Errors

Four Hundred Guru

BACK ISSUES

From the IT Jungle Forums
Rexx STDIN File

What is holding companies back from using CASE tools?

Hexadecimal thumbprint of a file

Duplicated printer files

Problem with "cpyfrmimpf"





 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement