what is the correct form to read and write the formats of the dspfile?

185 pts.
Tags:
AS/400
COBOL
DSPF
hi,
what is the correct form to read and write the formats of the dspfile?
i don t know if is it correct:
READ PANTALLA2 FORMAT IS 'ASU906CEF1'
what is the meaning of 'ASU906CEF1' ?


Software/Hardware used:
as400

Answer Wiki

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

First I strongly encourage you to review Chapter 21 Using Transaction Files of the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc092540.pdf”>ILE COBOL Programmer’s Guide</a>. Display Files (*DSPFs) in COBOL are called Transaction Files and the correct way to read a *DSPF is the READ statement.

Within a *DSPF there can be multiple record formats defined. Evidently there is one in your *DSPF named ‘ASU906CEF1′. Somewhere in the program there is most likely also a WRITE statement which has previously written record format ‘ASU906CEF1′ to the display device, the user has then entered/changed/reviewed the data, and now the COBOL program wants to read the changed data (if any). You can have multiple record formats concurrently being displayed on the display device and you are explicitly requesting the data associated with record format ‘ASU906CEF1′.

Looking at the DDS used to create the *DSPF you should find the definition of the record format following the line

<pre>
…..AAN01N02N03T.Name++++++RLen++TDpBLinPos
A R ASU906CEF1
</pre>

Bruce Vining

————————————————
Hi,

to write and read a display file format in RPG we use EXFMT opcode.The general syntax will be as follows:
EXFMT rcdfmt name
here in your question ASU906CEF1 means the record format name given while creating the display file. It is the way in which the records on the display are accessed by the program.

Hope this will help

Ram

Discuss This Question: 2  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
  • ten2008
    The EXFMT opcode does a combination of write and then read from the display file.
    1,150 pointsBadges:
    report
  • TomLiotta
    RPG and CL both have instructions that write and then read display format records in a single operation -- EXFMT for RPG as previously noted, and SNDRCVF for CL. Many other languages need both a WRITE and a READ instruction to be coded separately. COBOL requires both statements. Tom
    125,585 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