Which command we can use to update a physical file using c.l pgm?
Answers were Sorted based on User's Feedback
Answer / madhusudhan
As mentioned above by Rajeev and Sumit, both the commands
will work. There is one more which i tried and it worked.
You can use the below way
RUNSQL STMT('Update LIB/File Set Field = "1" where Field
="2" ')
I have tried all the three ways and after working i am
posting it here.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / swathi
can't possible to update/delete/change through CL PGM.Only we can read through CL PGM.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ramana
hi,
we can update data in cl, but we can use runsqlstm commance,
here if use select statement u canot select data, ucan
update dlelete
| Is This Answer Correct ? | 5 Yes | 5 No |
Answer / jeetu
we can not update batabase file through CL.it is possible through RPG by using UPDAT opcode.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / swapan
we cant update from CL PGM.....rather we can do type RUNSQLSTM IN command prompt & from there we can go to the sql prompt for any changes required.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / john
i am sure cant update database file through clp.........
| Is This Answer Correct ? | 0 Yes | 3 No |
What is the purpose of the "N" in the following calculation specification? C KEY CHAIN FILE N 99
how do you read changed records backward in subfile?
Define what the operation will do, the purpose of the result field and the purpose of *IN66? HI LO EQ C CALL 'CVTDAT' DTPRM 66
what is the use of jdftval in join logical file?
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.
What is a Device file?
What is the difference between a Physical File & a Logical?
28 Answers Accenture, ACS, IBM,
how you get the relative record in a subfile in which cursor is located?
How can the user implicitly open and close the files in RPG program ?
(1)In Cl Program,Are PGM and ENDPGM mandatery Keywords or not .If yes, please tell me why these keywords is necessary. (2)If we will not define these two keywords (PGMand ENDPGM) then any error will be come or not.
what are different types of substems?
What is class of service ?