How we can delete all the Logical File of a Physical file
in one instance ?

Answer Posted / abhishek

Hi Friends,

There is no command which directly deletes all the
depandent logical.



Regarding use of option delete dependant file under CHGPF:

Consider example below:
Lets say PF has 3 fields... Fld1, Fld2 & Fld3
First LF has key field as Fld1.
Second LF has key field as Fld2

1. Pl note that delete dependant file option will only come
when you specify the source name and libr along with object
name & libr.
2. Lets say, I have removed one of the field named Fld2
from my PF. Obviously, my second LF is of no use, as field
use by this file is removed. Now, if I specify, DELETE
DEPENDANT FILES as *YES under CHGPF command, it will first
change my PF properties (as expected) and will also delete
SECOND LOGICAL FILE (as it has a dependant field).

Hope, it helps. Cheers.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the maximum number of fields under a record format of physical file?

1007


can you explain the difference between spacea,spaceb,skipa and skipb. I'm new to learning about as400 and printer files. can any one give me an example using source code showing the difference that occurs between using these 4 keywords. A-Physical file PF004 source UNIQUE R RR STUNAM 10 ROLLNU 5 0 MARKS 3 0 SEX 6 K ROLLNU 4 records present in PF004 are STUNAM ROLLNU MARKS SEX KAVYA 12,344 55 FEMALE MADHAVAN 14,579 60 MALE RAMYA 14,785 70 FEMALE KRISHNAN 14,988 72 MALE B-Printer File PRINT1 source A R HEADER A 10 3'STUNAM' A 10 20'ROLLNU' A 10 30'MARKS' A 10 40'SEX' A R DETAIL A SPACEB(1) A STUNAM 10 3 A ROLLNU 5 0 20 A MARKS 3 0 30 A SEX 6 40 A R FOOTER A SPACEB(1) A 20'END OF REPORT' C-RPG/400 Program PRTTPG source FPF004 I F E DISK FPRINT1 O E PRINTER C WRITE HEADER C READ PF004 60 C *IN60 DOWEQ *OFF C WRITE DETAIL C READ PF004 60 C ENDDO C WRITE FOOTER C SETON LR D-spooled file result set Display Spooled File File . . . . . : PRINT1 Page/Line 1/10 Control . . . . . Columns 1 - 130 Find . . . . . . *...+....1....+....2....+....3....+....4....+....5....+.... 6....+....7....+....8....+....9....+....0....+....1....+.... 2....+....3 STUNAM ROLLNU MARKS SEX KAVYA 12344 055 FEMALE MADHAVAN 14579 060 MALE RAMYA 14785 070 FEMALE KRISHNAN 14988 072 MALE END OF REPORT Bottom F3=Exit F12=Cancel F19=Left F20=Right F24=More keys I have changed from SPACEB to SPACEA now in my printer file source E-Changed PRINT1 Source A R HEADER A 10 3'STUNAM' A 10 20'ROLLNU' A 10 30'MARKS' A 10 40'SEX' A R DETAIL A SPACEA(1) A STUNAM 10 3 A ROLLNU 5 0 20 A MARKS 3 0 30 A SEX 6 40 A R FOOTER A SPACEA(1) A 20'END OF REPORT' F-Spooled file Result Set after keyword change Display Spooled File File . . . . . : PRINT1 Page/Line 1/10 Control . . . . . Columns 1 - 130 Find . . . . . . *...+....1....+....2....+....3....+....4....+....5....+.... 6....+....7....+....8....+....9....+....0....+....1....+.... 2....+....3 KAVYAM 12344U 055KS FEMALE MADHAVAN 14579 060 MALE RAMYA 14785 070 FEMALE KRISHNAN 14988 072 MALE END OF REPORT Bottom F3=Exit F12=Cancel F19=Left F20=Right F24=More keys Overprinting not displayed.

10253


how may a cgi control duplicate inputs?

599


the maximum number of subfiles that can defined in a rpg program for one display file is ___ .

2181


To Add A File To The 'file Selection' Option Of A Query, The Function Key To Be Pressed Is?

795






maximum number of subfiles that can be active for a single file is?

976


Difference Between Ca & Cf?

704


Hi,Please give me the the answer for these quesitons? 1.what is IFS and ICF and RAPE amd DISKET fils? explain with example please? 2.What is the difference between POST AND SPACE OPCODES? 3.Can anybody tell me default printerfile command and object type?

2087


is there any way to dynamically merge other html scripts into a given html?

602


explain the purpose of keep and assume keywords?

1065


what does check opcode do ?

1069


What Does 'sr' In Columns 7-8 Of C Specs Mean?

1069


What is data structure in as400? What is the use of data structure?

604


How to avoid using indicators in ile ?

773


explain the use of dftwrt display keyword?

1138