what is the correct form to read and write the formats of the dspfile?
180 pts.
0
Q:
what is the correct form to read and write the formats of the dspfile?
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
ASKED: Oct 27 2009  4:50 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
4875 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
First I strongly encourage you to review Chapter 21 Using Transaction Files of the ILE COBOL Programmer's Guide. 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


.....AAN01N02N03T.Name++++++RLen++TDpBLinPos
A R ASU906CEF1


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
Last Answered: Oct 27 2009  2:45 PM GMT by Bvining   4875 pts.
Latest Contributors: Ten2008   730 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Ten2008   730 pts.  |   Oct 27 2009  12:25PM GMT

The EXFMT opcode does a combination of write and then read from the display file.

 

TomLiotta   7610 pts.  |   Oct 27 2009  6:53PM GMT

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

 
0