× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Shiva,


You must test for *In03 immediately after your EXFMT:

DoW Not *In03;  // Do Until Exit
Exfmt DSTUDENT; // Display Workstation

If *In03;               // User Keyed F3 To Exit
Leave;          // Exit Loop
EndIf;

Eval SID = DSID;        // Move Keyed Value To Output
Write   STUDREC;        // Add A Record To The File
EndDo;

You should also be checking to determine if the value keyed for StudentID is
already on file, otherwise you will get a duplicate records error.  Think
this process through before you code it.


Robert Munday
Munday Software Consultants
Montgomery, AL
on assignent in Dublin, OH

"Don't tell me... you're from Ohio".  No, I'm from Alabama... I only work in
Ohio...


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of koti shiva
Sent: Friday, August 18, 2006 3:00 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: while exit from the dsply fiel its adding a blank record with
0'


Hi all,

  i am adding records to a physical file through a dsply file while exit
from the dsply file it adding a blank record to physical file.

  can any body help me, bellow is my code.


  RPG Code
  0002.00 FSTUDENT   IF A E             DISK
0003.00 FSTDNTDSP  CF   E             WORKSTN
0004.00 C                   DOW       *IN03=*OFF
0005.00 C                   EXFMT     DSTUDENT
0007.00 C                   EVAL      SID =dSID
0008.00 C                   WRITE     STUDREC
0010.00 C                   enddo
0011.00 C                   return

  PF code
  0002.00      A          R STUDREC
0003.00      A            SID            3S 0

  Dsply file
                                          CA03(03 'F3=EXIT')
 A
 A          R DSTUDENT
 A                                  5  5'ENTER THE STUDENT ID : '
 A            DSID           3S 0I  5 35
 A                                 22 20'F3=EXIT'

   TIA
   Shiva Shanker


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.