|
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
DLTPGM
DLTPNLGRP
DLTQMFORM
DLTQMQRY
DLTSBSD
D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BQ
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
|