Processing of keyed program described files in RPG

165 pts.
Tags:
AS/400 development
Keyed program described files
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Shrutigupta
    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 pointsBadges:
    report
  • Gilly400
    Hi, That's the start position of the key (Kloc = Key location). Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Shrutigupta
    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 pointsBadges:
    report
  • Shrutigupta
    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 pointsBadges:
    report
  • Gilly400
    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,730 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following