Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VARPG Subfile Write

Posted on 2004-09-01
4
Medium Priority
?
505 Views
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:

     H
     H*EXE
     H*NOMAIN
     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
      /free
        *inlr = *on;
      /end-free
     C                   ENDACT
      *********************************************************************
      *
      * Window . . : WIN1
      *
      * Part . . . : CAN000000A
      *
      * Event  . . : CREATE a subfile from a physical file on the 400
      *
      * Description:
      *
      *********************************************************************
      *
     C     CAN000000A    BEGACT    CREATE        WIN1
      /free
        // 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;
           Enddo;
      /End-free

     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.




0
Comment
Question by:pugmi16
  • 2
4 Comments
 
LVL 14

Expert Comment

by:daveslater
ID: 11958046
Hi
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.

Dave
0
 
LVL 27

Accepted Solution

by:
tliotta earned 220 total points
ID: 11969428
Dave:

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:

  news://news.software.ibm.com/ibm.software.varpg

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.

Tom
0
 
LVL 14

Expert Comment

by:daveslater
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
daveslater
Page Editor
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Integration Management Part 2
Screencast - Getting to Know the Pipeline

885 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