165 pts.
 Processing of keyed program described files in RPG
Hi, I am very new to RPG and have a doubt on processing of keyed program described files. I know it's not a good idea to use program described files as externally described files offer many advantages over the former, but I am just exploring the alternatives. How do we tell the system about the key of program described files. Regards Shruti.

Software/Hardware used:
ASKED: April 2, 2009  11:45 AM
UPDATED: April 3, 2009  10:16 AM

Answer Wiki:
Hi, Here's an example of a program described file with a key from position 1 to 10 :- <pre> FFilenameIPEAF....RlenLK1AIOvKlocEDevice+......KExit++Entry+A....U1........ FFILE IF F 256 10AI 1 DISK </pre> Regards, Martin Gilbert.
Last Wiki Answer Submitted:  April 2, 2009  12:06 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks for the answer. I understood the purpose of all entries except ’1′ preceding ‘DISK’. Could you please tell me why is it used?

 165 pts.

 

Hi,

That’s the start position of the key (Kloc = Key location).

Regards,

Martin Gilbert.

 23,625 pts.

 

Okie now I understood, but some people explicitly use KEYLOC function for the location of the key, is there any difference between the two?

 165 pts.

 

Hi,

Prompt for File Specs looks like the following:

FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++++++++++++++++Comments++++++++++++
*************** Beginning of data *************************************************************
FEmployee IF F 39 5AIDISK KEYLOC(1)

which doesn’t have Key Location in it, that’s why I had to use KEYLOC function…while your prompt for F-specs looks different.

Regards
Shruti.

 165 pts.

 

Hi,

Sorry, I used the RPG/400 prompt instead of the ILE prompt. We still use a lot of RPG/400 here, and sometimes I look at the wrong one.

Regards,

Martin Gilbert.

 23,625 pts.