• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Commands with Generic Parameters

    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
    DLTSCHIDX
    DLTSPADCT
    DLTSQLPKG
    DLTSRVPGM
    DLTTBL
    DLTTIMZON
    DLTUSRIDX
    DLTUSRQ
    DLTUSRSPC
    DLTUSRTRC
    DLTVLDL
    DSPACCGRP
    DSPAUDJRNE
    DSPDBR
    DSPDDMF
    DSPDTADCT
    DSPFCNUSG
    DSPFD
    DSPFFD
    DSPOBJD
    DSPOPT
    DSPPFRGPH
    DSPPGMREF
    DSPPRB
    DSPRDBDIRE
    DSPSYSVAL
    DSPUSRPRF
    EXTPGMINF
    GENCMDDOC
    GO
    GRTOBJAUT
    HLDJOBSCDE
    MONMSG
    PRTADPOBJ
    PRTCMDUSG
    PRTCPTRPT
    PRTDIRINF
    PRTDSKINF
    PRTINTDTA
    PRTJOBRPT
    PRTPEXRPT
    PRTPOLRPT
    PRTPRFINT
    PRTSYSRPT
    PRTTNSRPT
    PRTTRC
    RLSJOBSCDE
    RMVAUTLE
    RMVBNDDIRE
    RMVCFGLE
    RMVCMNE
    RMVDSTRTE
    RMVJOBSCDE
    RMVM
    RMVPEXDFN
    RMVPEXFTR
    RMVRDBDIRE
    RMVTRCFTR
    RMVWSE
    RSTAUT
    RSTCFG
    RSTLIB
    RSTOBJ
    RSTS36LIBM
    RSTUSRPRF
    RTVBNDSRC
    RTVCFGSRC
    RTVMBRD
    RTVSYSVAL
    RVKOBJAUT
    SAVCHGOBJ
    SAVLIB
    SAVOBJ
    SAVRSTCFG
    SAVRSTCHG
    SAVRSTLIB
    SAVRSTOBJ
    SAVS36F
    SAVS36LIBM
    SLTCMD
    STRCMNTRC
    STRTRC
    TRCCNN
    TRCINT
    TRCTCPAPP
    UPDPGM
    UPDSRVPGM
    VRYCFG
    WRKACTJOB
    WRKALRTBL
    WRKAPPNSTS
    WRKAUTL
    WRKBNDDIR
    WRKCFGL
    WRKCFGSTS
    WRKCHTFMT
    WRKCLS
    WRKCMD
    WRKCNNL
    WRKCOSD
    WRKCSI
    WRKCTLD
    WRKDDMF
    WRKDEVD
    WRKDTAARA
    WRKDTAQ
    WRKEDTD
    WRKF
    WRKFCNUSG
    WRKFNTRSC
    WRKFORMDF
    WRKFTR
    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

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    New Generation Software

    FREE Webinar:

    Creating Great Data for Enterprise AI

    Enterprise AI relies on many data sources and types, but every AI project needs a data quality, governance, and security plan.

    Wherever and however you want to analyze your data, adopting modern ETL and BI software like NGS-IQ is a great way to support your effort.

    Webinar: June 26, 2025

    RSVP today.

    www.ngsi.com – 800-824-1220

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    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

    New Jersey Hospital Picks HMS for Healthcare Apps CA Extends Change Management to i5/OS

    Leave a Reply Cancel reply

Volume 7, Number 30 -- August 22, 2007
THIS ISSUE SPONSORED BY:

WorksRight Software
Help/Systems
Krengeltech

Table of Contents

  • If the Compiler Can’t Find the Mistake, Maybe You Can
  • Commands with Generic Parameters
  • Troubleshooting NetServer File Copy Errors

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle