can we use cl programming to update or delete physical files

Answer Posted / saravan

We can clear file using CLRPFM command.
If we want delete PF we can use DLTF command.
But before delete any PF first of all we need to
delete all the LFs related in that PF.(DSPDBR=Display Data
Base Relations,we can get all LFs relating to that PF)You
must give the correct Library name for all the commands
above.
For UPDATE, DELETE & INSERT, use RUNSQL command.
Ex: RUNSQL (UPDATE LIBR/FILE SET FLD = 'XXX'
WHERE CONDITION)
Note: RMVM is to delete/remove a member from a file. But
not to delet a file completely.

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

1747


can you debug ile rpg program using isdb?

979


How would display prime numbers using CL program?

5999


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

974


how does the rpg element work?

970


what is the procedure and explain about real time scenario.

1728


how do I play {insert rpg system here}?

815


which program rpg or cl is efficent to update a transaction onto a database file and why ?

1024


How Chain operation copies the record's data to the input buffer for the program?

1352


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

757


How to declare the pull button in AS/400..

2149


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1416


How to call one program from another program in RPG? please help me with the code

1515


What is the purpose of record level identifier?

926


can I touch the array during treatments?

970