Which command we can use to update a physical file using c.l pgm?
Answers were Sorted based on User's Feedback
Answer / vignesh c
We cant update a database file using cl
|Is This Answer Correct ?||56 Yes||12 No|
Answer / bharathi
We can not update files from CL programs. We can read files
|Is This Answer Correct ?||31 Yes||6 No|
Answer / sidd
We can update physical files from CL program by either
usinf RUNSQLSTM or STRQMQRY
|Is This Answer Correct ?||20 Yes||3 No|
Answer / mithun paul
By using RUNSQLSMT or STRQMQRY.
|Is This Answer Correct ?||17 Yes||3 No|
Answer / sumit
Everyone is saying we cannot update pf using Cl...But please
try once using RUNSQLSTM before marking 'NO' to any answers.
As we can update a PF using CL.
RUNSQLSTM uses source file where source member is present.
And this source member contain UPDATE SQL, OR DELETE SQL, OR
Once this statement run in CL then PF will get updated,
deleted or inserted with the new record.
|Is This Answer Correct ?||11 Yes||0 No|
Answer / anupam
Use of RUNSQLSTM helps in updating the physical file within
a CL program.
SQLPGM should contain
UPDATE PF set DATA='Value' where DATA'='Value1' and it will
update the PF
|Is This Answer Correct ?||8 Yes||2 No|
Answer / rajeev
We can not update a database file throught CL in a normal
way but if we use QSH then we can update or insert. Here I
am showing a exaple of insert.
QSH CMD('db2 "insert into $SCHEMA.$TABLE + VALUES(12,
5,''rajeev'', ''2009-11-24'',.2" ')
|Is This Answer Correct ?||6 Yes||1 No|
Answer / gaurav agrawal
In CL program we can not update the database file ,
we can read only.
if any doubt contact at firstname.lastname@example.org
|Is This Answer Correct ?||7 Yes||3 No|
Answer / jaishriram
Did anyone tried to test Rajeev's Answer 13, Saying about to
update file using "QSH" ? Not sure....anyone gave a try.
But folks, it works. You know. He really discover a new way
of updating files from CL program.
Thanks Rajeev. Thanks a lot for sharing this tech info.
|Is This Answer Correct ?||2 Yes||0 No|
If login Screen has been modified by adding current date to be displayed. What Step to be followed to Keep that date as Current date Note: If no steps taken then it will display only the compilation date
What is the difference between non-join logical files and join logical files?
what is library?
how can I give more performance to some selected pages?
how many triggers can be associated with a file?
can you display a empty subfile?
what are the types of errors available in rpg IV or 400.Like decimal data error,sessional error or device error etc...means important error occurings,ie to find out suddenly???pls give answ if u know?Pls give the answer 1,,,,,,,to 12.........ie how it will happened like...for eg if a file is not closiing ,,,like this error is happened... if sufficient data is not in a pf to write in a display file. or sfldsp is not "on"......sessional or device error occured...like this give details all 1 to 12 errors (syam..)....give details PLsssssssssss?
what is the purpose of indicators in rpg?
Hey, What is the difference between SCAN,CHECK,XLATE OPCODES? please give me the answeres with example in real time senario?
What is the purpose of OPNQRYF (Open Query File)?
Q. 1.What are the in build functions in CL program and what are uses of thes in build functions? 2.How we can create own command in CL program? 3.What is use of STRSRVJOB?
list some of the commonly used commands for debugging?