Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Command values

Posted on 2001-06-27
8
Medium Priority
?
333 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
  • 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 400 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month9 days, 22 hours left to enroll

926 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