How do I create a flat file in AS400?

We need to use the CRTPF command as below in the command line to create a physical file. RCDLEN must be specified, SRCFILE and SRCMBR cannot be specified; RCDLEN is used to specify a fixed record length for the record format. A value ranging from 1 through 32766 bytes can be specified for the record length.

How do you create a flat file in Rpgle?

Declaring flat file in RPGLE – when a flat file is declared in RPGLE, make sure to rename record format because RPGLE won’t allow you to have same file and record format name. In order to rename the record format we use RENAME keyword in F-spec.

How do I create a display file in AS400?

STRSDA (Start Screen Design Aid) Start the screen design aid by using STRSDA and select option-1. Option-1 selection results into the screen below. Press ENTER and select option-1 to add new record. Option-1 provides the screen to add a new record to the display file.

How do you create a flat file in Notepad?

To create a log file in Notepad:

  1. Click Start, point to Programs, point to Accessories, and then click Notepad.
  2. Type . LOG on the first line, and then press ENTER to move to the next line.
  3. On the File menu, click Save As, type a descriptive name for your file in the File name box, and then click OK.

What is a file in AS400?

A physical file is a database file that contains data records. The data records are grouped into physical file members and each member has its own access path to the data. Normally, database files have only one member which, by default, is added to the file when the file is created.

How does AS400 store data?

For the AS/400 operating system, data is stored in files. A library name. Libraries contain the names of programs, files, and commands. Each file can consist of data records, source programs, or database definitions.

How do you create a display file in Rpgle?


  1. File name: Mention here name of the file that you are going to use in your program.
  2. File Type: Mention the file type as I,O,U,C where I= INPUT, O=OUTPUT,U=UPDATE,C=COMBINED.
  3. File Designation: Mention the File Designation as P,S,F where P=PRIMARY,S=SECONDARY,F=FULL PROCEDURAL.

What is printer file in AS400?

Printer files describe how the system operates on the data as it passes between your application program and a printer. A printer file handles every request for printing with one exception. It applies only to the Print key when the display station has an attached remote workstation controller.

Is txt a flat file?

Linear stores of NoSQL data, JSON formatted data, primitive spreadsheets (perhaps comma-separated or tab-delimited), and text files can all be seen as flat-file databases, because they lack integrated indexes, built-in references between data elements, or complex data types.

What are physical files in the AS400 Database?

Physical files in AS400 A physical file is a database file that contains data records. The data records are grouped into physical file members and each… Written by Naveen Kumar Aug 12 · 6 min read >

How to create a physical file from a flat file?

This is because each record of a flat file actually contains several columns of an ordinary physical file. Create a physical file using CRTPF command. Give the total length of each record of the flat file in record length field. In this situation, system creates a physical file.

What is the unique keyword in AS400?

UNIQUE : File level keyword used to specify that records with duplicate key values are not allowed within a member of this physical or logical file. You can specify whether null key values are to be considered as duplicates using the parameter.

How to create a flat file in rpg-400?

1. In F spec File is declared, with Output mode [ O ] and File is described as Program described File [ F ]. And record length is also [ 150 ]declared. 2. We are selecting IPDS prompt to enter the Data Structure with the size of the flat file. ( Actually 52 is the maximum length to display data structure in RPG-400). 3.

Share this post