what is the difference between the cpyf command crtdupobj
command?

Answers were Sorted based on User's Feedback



what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

what is the difference between the cpyf command crtdupobj command?..

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

Post New Answer

More RPG400 Interview Questions

To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...

5 Answers  


1.What is referential Integrity? 2.What is Foreign Key? 3.What is Transfer Control? 4.What is Free format?

3 Answers  


What would be the result on writing a data record to a PF file using the "WRITE" opcode after the SETON *ON *INLR statment?

10 Answers  


1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?

2 Answers   TCS,


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

0 Answers  






What is the RPG cycle?

3 Answers   CSC,


Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?

3 Answers  


This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out

4 Answers   Virtusa,


How many program bind in one module....

0 Answers  


please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?

4 Answers   HCL,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


wat is the difference between array and multiple occurence data structure?

4 Answers   Four soft,


Categories