A program is a type of data.
A program in a computer is group of computer instructions or commands that, when loaded into memory, can be run by the computer processor to accomplish a task. Data is information that can be used by a computer program. It can be data in memory as part of the "workings" of a program, it can be stored in an area called a file or database from where it can be read and written.
In modern computers, both data and program can exist in the same memory areas and on the same storage media. Programs are first made in a human readable text form and treated as data while it is being created and modified/edited. Another program (or programs) will convert this data into another form of data which can serve as a computer program.
On most computer systems, program and data are stored as files. Usually a program is distinguished from other data by its name (its name will end with ".EXE") or by a special information designating the file as "executable". This is different on the IBM i platform (and its predecessors) where a program is maintained as a program object (*PGM) and data is stored as various types of data and file objects (*FILE).
Chat with our AI personalities