what is the difference between the cpyf command crtdupobj
command?
Answers were Sorted based on User's Feedback
Answer / noah
cpyf copy file member is to copy file content to an existing
file. If file does not exist then user can create a new
file. The structure will be based on source file.
crtdupobj create duplicate object, create clone exactly as the
source file with structure and content with its link to prgram
and logical file and its authority setting as well. no need to
recompile pgm that use this file.
Is This Answer Correct ? | 18 Yes | 5 No |
Answer / sujan
wE CAN'T ABLE TO CREATE A LOGICAL FILE DUPLICATE BY USING
CPYF COMMAND, IF U USE THIS THE LOGICAL FILE CREATED OF FILE
TYPE *PF INSTEAD OF *LF.SO THAT U USE CRTDUPOBJ TO CREATE
THE LOGICAL FILES DUPLICATES
SYNTAX:
CRTDUPOBJ OBJ(OLD_OBJNAME) FROM lIB(LIBNAME)
OBJTYPE(OBJTYPENAME) TOLIB(TOLIB_NAME) NEWOBJ(NEWOBJ_NAME)
Is This Answer Correct ? | 12 Yes | 5 No |
Answer / indraneel
cpyf command is to be used when you want to copy the data
of the file. For eg. if want a selection of data that can
be done. It is not necessary that from file and to file
record format are exactly same
In case of crtduobj, a clone of the object is created.
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / sanjay
CPYF command are used to copy the all data from one data
base file to another or copy the required data from one
file to another files .
when we copy the data from one file to another file that
time if user want to create new file then create new file
object by using CPYF command
CRTDUPOBJ - this command used to create duplicate object
from any existing object your AS400 system.
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / swami redddy
the command is used to create a duplicate object crtdupobj
from an existing object .this command not only creates a
duplicate objects but also copies the contents of the existing
object into a newly created duplicate object.
syntax for crtdupobj as given below
crtdupobj obj(old object name)
from lib(lib name)
obj type(any valid as/400 obj type)
to lib(into which obj.must be created)
newobj(new obj name)
data(*yes/*no)
(constraint) cst (*yes)
(trigger) trg (*yes)
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / parikshit
CRTDUPOBJ:1)triggers gets copied in the new file, also new
files gets journalled if base file is being journalled.
2)New file member name can able to changed.
3)Can copy selected members data from base file
to new file.
CPYF: 1)triggers not copied. New file not journalled.
2)New file member name cant changed.
3)all members data gets copied into new file.
Is This Answer Correct ? | 7 Yes | 4 No |
Answer / suri
CPYF works on physical files only.
CRTDUPOBJ works on any file.
If we use CRTDUPOBJ New files gets journalled if base file
is being journalled.
In CPYF new files r not jounalled.
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / shikha
Copy File (CPYF) command could be used to copy the source
into a database file.
(CRTDUPOBJ) command to create a copy of an existing object.
The duplicate object has the same object type and
authorization as the original object and is created into
the same auxiliary storage pool (ASP) as the original
object. The user who issues the command owns the
duplicate object.
If you create a duplicate object of a journaled file, the
duplicate object (file) will not have journaling active.
However, you can select this object for journaling
later. If you create a duplicate object and the object
(file) has no members, the last used date field is blank
and the count for number of days used is zero.
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / swami reddy
copyfile command copies the contents of existing database
file into another datbase file .
1.using cpyf command we cancopy data from external device to
a datbase file and viceversa..
Is This Answer Correct ? | 3 Yes | 5 No |
difference between 1:%found and %equal built function in detail with example .
1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?
Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?
list down and describe the sub systems vailable
please guys help me,I need to write a program that shows more than one way to display a subfile. Both views are of the same file but sorted differently and show different fields of the same file when the user presses a function key. send me code
I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want to read this file again. How i can do this?
5 Answers CitiGroup, Symphony,
What is the difference Return and InLr?
There is a excel sheet having details of Old account number and new account number. I need to update these details in my AS400 files. i.e. all the records having old account number should be replaced with new account number. There can be 100 or 200 or 300 PFs...no fix files known. how can we do this?Solution should be performance oriented
In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?
What is the OPEN and CLOSE accesspath?
As Packed veriable store 2 digits in 1 byte and ZONE variable store 1 digit in 1 byte... Please tell me when we have to use Packed and Zone variable...?
what is the difference between the procedure and module in ILERPG?