|
James, >Yes, I know one isn't *required* to prompt. But I didn't know that the >keywords aren't required. The number of positional parameters allowed is part of a command's definition. Personally, I like to use the default of MAXPOS(*NOMAX). But IBM, in their infinite wisdom, sets lower limits on many of their commands. In the particular case of CPY, IBM decided that only the first 6 parameters may be specified without keywords. You can see this by doing DSPCMD CPYF and looking at the "Maximum positional paramters" entry. When keying a command and leaving out keywords, you can specify *N for a positional parameter you want to skip. You can use both positional and keywords, but once you use a keyword you must use keywords for the remainder of the command. >Sticking with the "cat" example from before, how does one ... >cp file1 file2 file3 file4 outputfile This isn't a fair example, because CPYF does not have the same options as CP. CPYF (file1 file2 file3 file4) outputfile *n *n *replace *yes would do it if CPYF accepted a list for the from file. But it doesn't. By the same token, CPYF has options which CP does not. How do you tell CP to append an input file to an existing output file, rearranging the fields to match the output file, dropping those which don't exist in the new file, but selecting only those records which match multiple criteria like FIELDA > 3.14 and FIELDB <= FIELDC, but only if they are between relative record numbers 123 to 456? >> But your comment seems to reveal another difference of view. >> They lead me to believe that you think the paramount importance >> is the programmers time while KEYING IN the program or command. > >Yes, I think this is accurate about the way *I* believe. And not just >programmers, but all users. Whoa! Users should not need to key commands very often, if ever. Operators and programmers *can* leave out the keywords for ad hoc command entry, assuming they know the correct order -- unless IBM has placed an artificial limit on the number of positional parameters accepted. But the limit is usually somewhat reasonable and gets you past the "typical" arguments. The kind of arguments which may use a switch in *nix may require a keyword on an IBM command. >Hmm... and my experiece tells me that I will type in a thousand more >commands on the command line than I will read in a program, simply because >I read a program a few times, but *interact* with the system all day. If you type a thousand times more commands on the command line then you read in a program or script, then I'd suggest you are using the system different than many of us. <g> But if you really want to do it that way, then I sure hope you are running QCMD instead of just using F9 to retrieve previous values. (That is, type CALL QMD before you start, or make QCMD your default signon program.) This lets you scroll through your history, place the cursor on any line and press F9 to retrieve that command or F4 to prompt it. Press Help from QCMD for more options. And you really can enter most commands with positional parameters, or key as many positional parameters as you know then press F4 and fill in the rest. But because the terminal is block mode, you don't have all the capabilities of something like DOSKEY, or the various Fx keys used from a DOS command line to copy just part of a command line, etc. Doug
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.