How can i keyed a flat file in RPGLE

Answer Posted / jvn

Declaration of file
F abcd UF A F 100 10 A I DISK
KEYLOC(1)
file name pgm desc Record len Key len &type

The above file type declaration means file 'ABCD' is a
program described file of record length 100, key field
length 10 of type character and the file is indexed with
the position of key field starting from position 1 as per
the KEYLOC value.

I abcd xy
I 1 11 keyfield_name

They key field can be subsequently defined as per the
example above.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

750


What is difference between bind by copy and bind by reference?

1712


what is the rpg system?

656


what do you mean by an input subfile, what are the keywords required?

755


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

727






during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

745


How would display prime numbers using CL program?

5666


What is file identifier where we can use?

631


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1296


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

2356


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2507


what is program status data structure?

1362


is this a rpg channel?

665


What are the types of identifiers?

557


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

818