VARPG Subfile Write

Posted on 2004-09-01
Last Modified: 2012-06-27
Hello I am just getting into VARPG to create Windows Based Screens and went out on the net to find examples of how to do a simple subfile example. Here is the code I am doing:

     FCUSTOMER  IF   E           K DISK    REMOTE  BLOCK(*YES)
      * Window . . : WIN1
      * Part . . . : PSEXIT
      * Event  . . : PRESS this button to exit the program
      * Description:
     C     PSEXIT        BEGACT    PRESS         WIN1
        *inlr = *on;
     C                   ENDACT
      * Window . . : WIN1
      * Part . . . : CAN000000A
      * Event  . . : CREATE a subfile from a physical file on the 400
      * Description:
     C     CAN000000A    BEGACT    CREATE        WIN1
        // Read the physical file on the iSeries
           Read CUSTOMER;
           Dow (not(%eof(CUSTOMER)));
        // Write the Subfile record
           DSC = BUDDSC;
           SKU = BUDSKU;
           CUS = BUDCUS;
           Write Subf1;
           Read  CUSTOMER;

     C                   ENDACT

My issue is the Write Subf1 statement. When I comment it out the program compiles fine and when debuging I see it run through the CUSTOMER file putting the proper values into DSC, SKU and CUS. But when I uncomment out the Write Subf1 and build it... it says errors were found in the build so I look at the error list and nothing is there ( I have it so I view all errors including warnings). Also the part name under the subfile part properties is Subf1. When I change the statement to Subf1 to Subf1888888 it comes back with a warning that I didn't use Subf1 for input or output (Along with the eror that Subf1888888 is not defined which I did on purpose :) but found it interesting it atleast knows Subf1 is there. Am I suposed to install some PDF's for the subfile to work? Is there another way besides Write operator? (All examples on the net say it's that easy to just put write (Subfile Name) Help!! The Button and the subfile are all on one Canvas. Thanks for your help in advance.

Question by:pugmi16
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 14

Expert Comment

ID: 11958046
first I have never used this but since there is no other responce I will give you some one to bounce ideas off.

Normally on a subfile you have an indicator to display the subfile. Has this been set on?
There is also a subfile Relitive reconrd number that says whar record you are writing, I can not see that this has been set.

Have you created the DDS or does this system create it for you? Can you post it - from there we can try to see what needs to be set.

LVL 27

Accepted Solution

tliotta earned 55 total points
ID: 11969428

No DDS. The "subfile" is some kind of multi-line edit GUI box or something like that in VARPG. It gets gridded somehow according to the attributes of the "fields" you define for subfile lines.

I'd pull up a sample here and look at it, but I lost my hard drive at the office a couple days ago and don't have VARPG reinstalled yet.

If no responses show up here soon, I suggest looking here:


Look through old entries before asking a new question. You'll find that the IBMers developing VARPG spend a lot of time in that newsgroup.

LVL 14

Expert Comment

ID: 12144535
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept tliotta comment as answer

Please leave any comments here within the next four days.

Page Editor

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question