How I can read and display three fields in the record
format DSPFM1 of the display file,while
one field(using in one file) is NAME which is Key field in
field reference file and another two fields are AGE and ROLL
NO are using another file.

Please send me coding part.

Answers were Sorted based on User's Feedback



How I can read and display three fields in the record format DSPFM1 of the display file,while on..

Answer / syam

Changes in above code.

FFILE1 IF E K DISK USROPN ->Reading pf1
FFILE2 IF E K DISK USROPN ->Reading pf2
FDSPF CF E WORKSTN USROPN ->dspy file

C OPEN FILE1
C OPEN FILE2
C OPEN DSPF
C NAME SETLL FILE1
C READ recd1 51
C *IN51 DOWEQ *OFF
C NAME CHAIN recd2 41
C N41 WRITE DSPFM1
C READ FILE1 51
C ENDDO
C CLOSE FILE1
C CLOSE FILE2
C CLOSE DSPF
C RETURN


1.File1 & File2 need NAME key field
2.In dsplay DSPFM1 need Name, Age and Roll filed.
Recd1 = record format of File1 , Recd2 = record format of
file2

Is This Answer Correct ?    3 Yes 1 No

How I can read and display three fields in the record format DSPFM1 of the display file,while on..

Answer / syam

I am Pasting Code.
FFILE1 IF E K DISK USROPN ->Reading pf
FDSPF CF E WORKSTN USROPN ->dspy file

C OPEN FILE1
C OPEN DSPF
C SETLL FILE1
C READ FILE1 51
C *IN51 DOWEQ *OFF
C WRITE DSPFM1
C READ FILE1 51
C ENDDO
C CLOSE FILE1
C CLOSE DSPF
C RETURN

it will show all the records from file undil file ends.
if you need ILE RPG Free fromat code pls post again your
request

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

What is the difference between production library and test library ?

1 Answers  


What is a library list ?

1 Answers  


What is the purpose of reorganizing the physical file i.e. , RGZPFM?

1 Answers  


The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help... I m using RPG/ILERPG to download...

0 Answers  


what is the disadvantage of using global variable?

0 Answers   IBM,






Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?

0 Answers  


What is a Join Logical File, Can it be used for Update ?

1 Answers  


what is subfile?

1 Answers   IBM,


What are the mandatory keywords of sub file?

0 Answers   IBM,


What does SDA stands for ?

1 Answers  


what are indicators?

0 Answers   IBM,


What is the necessary keyword used in a physical file to refer field definitions from the field reference file?

1 Answers  


Categories