25 pts.
 Write PF using RPGLE
HI ... I tried to add a rec in my PF (sample1).. but my PGM run successfully .. but the rec haven't added in my PF .... I shared my PGM here sample1 uf a e k disk usropn open sample1 eval empname='Sathis' eval empno=13 eval addr='ramnad' write rec close sample1 eval *inlr=*on Please help me on this

Software/Hardware used:
ASKED: March 8, 2013  6:48 AM
UPDATED: March 8, 2013  1:06 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Michael Tidmarsh   11,400 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

The program works for me with no significant changes. I created my SAMPLE1 table with SQL, so I did add a RENAME() keyword for the record format to get the REC format name. But it worked as written.
 
So, it doesn’t seem to be a problem with the program itself.
 
That means that the program didn’t run successfully (perhaps didn’t run at all), or it added a record to a copy of the file, or it ran under commitment control and didn’t commit the record, or…?
 
More info is needed. The file description might help, but you should verify that everything is configured as you think it is.
 
Tom

 108,055 pts.

 
Fpf01      uf a e           k disk    usropn   
C                   open      pf01             
C                   eval      eno=100          
C                   eval      ename=’xyz’      
C                   eval      esal=40000       
C                   write     format           
C                   close     pf01             
C                   eval      *inlr=*on        
 430 pts.

 

i am able to write a record successfully not sure why you are not able to do , for your information , i have given you the code which might help full to you.

Ravula

 430 pts.

 

Is it a library list problem?

 32,855 pts.

 
Perhaps there is a gap in our understanding 
   of what you’ve done.

Your program compiled successfully?  
   What did you do, how do you know this?

Your program ran successfully?  
   What did you do, how do you know this?

Your program didn’t add a record?  
  What did you do, how do you know this?
 44,180 pts.

 

Have you tried to debug your program?  Check if there is another instance of your file in a different lib. Is your program running interactive or batch? Check the objects, pgm and file to see when they were last used. Get some more data the check back for more answers.

 3,910 pts.