Solved

Command values

Posted on 2001-06-27
8
328 Views
Last Modified: 2008-02-01
Is it posible for me to chang the defold values of a AS400 command so as the SRCFILE parameter from the CRTPF command is now QDDSSRC, I like to chang that to QDBSRC.
How can i do it.

0
Comment
Question by:kouthe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:olidel
ID: 6232678
Hi,

    Use the following command with the value that you wish to use :

CHGCMDDFT CMD(*LIBL/CRTPF) NEWDFT('srcfile(*libl/QDBSRC)')

Bye.
0
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 100 total points
ID: 6232832
No! No! No!

Never change the IBM supplied commands.....

Don't do that....

It is possible (as olidel explained) but

DO NOT DO IT THAT WAY.

WHY????

Reason 1.
-----------------
All the changes that you apply with this commnand are overwritten when you install a new release in of OS/400.


Reason 2.
-----------------
The standard IBM Commands are used by almost all the standard software packages. Without defining all the parameters.
So if you change the Standard IBM Commands, then you have a big chance that you also changing the standard functionality of the standard software (if you have any).

The right way to do it is creating your own command with all the parameters (or only the one that you will use) and pass these parameters to an CL that executes the standard IBM Command.

Example:
-----------
In your case you can create a MYCRTPF or XCRTPF instead of the CRTPF command.

It even must be possible to copy the standard Command and change that with your own default values. But then you can also have a problem with newer releases.

0
 
LVL 2

Expert Comment

by:olidel
ID: 6233531
Well, murphey2 is right but there is another way to solve these problems, and this is the way we are doing with ou AS/400s.

     1 - You must modify only the really necesary command that you want.
     2 - You must know the parameter and the comand that you are changing.

     3 - In case of an upgrade of our system we run a special program which is modifying among other thing the defaults values of a few commands supplied by IBM to fit our needs. This program is very useful because anyway IBM change quite a few things when you are doing an upgrade (system values, subsystem description, a.s.o.). This program is putting back after an upgrade all those values the way we want them. Of course, you have to maintain this program.

     4 - Don't forget IBM can also change the default value of it's own command between 2 releases or with a PTF.

     5 - This is true that software package can use the standard command. But, if you want that these package work the way you want you must sometimes modify the IBM command. Of course, you must be very careful an you must know what you are doing.

Bye

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:olidel
ID: 6233532
Well, murphey2 is right but there is another way to solve these problems, and this is the way we are doing with ou AS/400s.

     1 - You must modify only the really necesary command that you want.
     2 - You must know the parameter and the comand that you are changing.

     3 - In case of an upgrade of our system we run a special program which is modifying among other thing the defaults values of a few commands supplied by IBM to fit our needs. This program is very useful because anyway IBM change quite a few things when you are doing an upgrade (system values, subsystem description, a.s.o.). This program is putting back after an upgrade all those values the way we want them. Of course, you have to maintain this program.

     4 - Don't forget IBM can also change the default value of it's own command between 2 releases or with a PTF.

     5 - This is true that software package can use the standard command. But, if you want that these package work the way you want you must sometimes modify the IBM command. Of course, you must be very careful an you must know what you are doing.

Bye

0
 
LVL 2

Expert Comment

by:olidel
ID: 6233534
Sorry, for the duplicate message, It looks like my browser didn't handle in a correct manner the prvious message.
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6234186
Oke... if it is realy important that you use the same commands as the standard IBM, copy the command from QSYS to a (new) library e.g. "MYSYS".
You can change the defaults of this command as you like.
and then put this library in the system part of your librarylist with chgsyslibl.

But beware.... a lot of commands have different versions on your system they are stored in libraries as:

QSYS      
QSYSV3R1M0
QSYSV3R2M0
QSYSV3R6M0
QSYSV3R7M0
QSYS38    

I advise to use the one from QSYS, this is the one that will be used by typing CRTPF.

To avoid problems with the standard packages, you better not change IBM supplied commands.
Even if you start jobs in a standard package BE SURE WHAT YOU ARE DOING or start an other session without the new made "command library".

Good luck
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6234265
Additional information
----------------------

I have scaned thru our standard package and I could not find any program that uses the SRCFILE parameter from the CRTPF command.

the most commands look like this:
CRTPF FILE(QTEMP/CUSTMSTR) +
      MAXMBRS(*NOMAX) +
      SIZE(*NOMAX) +
      REUSEDLT(*YES)                        

Yep, creating workfiles in QTEMP and with 80 concurent user this will happen 100's of times per day.
So if I should change the value SRCFILE parameter from QDDSSRC to QDBSRC, all programs that are creating files will end in an error.

Regards.
0
 

Author Comment

by:kouthe
ID: 6235042
I better be sure... and don't experiment to much.. So the way murphy2 says sound convinced.

Thanks guys
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a serious pitfall that can happen when deleting shapes using VBA.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question