List the steps/commands necessary to accomplish the following:

a. Copy data from the file ORDHDR into file ORDHIST
b. The file ORDHIST may or may not exist
c. If the file ORDHDR does exist, it may or may not contain data
d. The file ORDHIST may or may not contain data, if the file does contain data the old data should be erased

Answer Posted / supranshu saurabh vir singh

Commands: a. CPYF FILE(ORDHDR)
TOFILE(ORDHIST)
b. CPYF FILE (ORDHDR)
TOFILE (ORDHIST) CRTFILE (*YES)
c. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *ADD
d. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *REPLACE

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

during input operation which indicator position is seton if there is a record lock?

925


What is access path in as400?

845


Using %check we are checking monika in mona what is output? What is %SCAN?

989


explain the difference between defining subfile and message-subfile?

1105


How can we change the uppercase to Lowercase in RPG?

929






What are the record format field mapping options in cpyf?

611


how can database records be read without lock ?

1216


what is cab?

661


how can a message from a message file appear as a constant on the screen?

931


What is binder language ?

1361


How to debug a batch job when it is in messagewait(mswg) status. I know the steps for batch ebugging, but im confusing with when we submit any job for batch debug we put in held state. So here also do same thing or any other way?

703


what is the maximum number of parameters allowed in rpg?

1032


what is the difference between *like and *namvar ?

1558


what is the purpose of putovr (put with explicit override) keyword?

928


what is the difference between packed decimal and zoned decimal?

2252