Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to transfer data from one MAINTAIN Procedure to other???
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] How to transfer data from one MAINTAIN Procedure to other???
 Login/Join
 
Member
posted
Hi,

Please can any one help me in transferring data from one maintain procedure(.mnt) to another(.mnt) in the same project in Update records case.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7, 8
Windows, All Outputs
 
Posts: 4 | Registered: March 20, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
At which point, or from where, are you wanting to call another maintain process and pass parameters?


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Reply With QuoteReport This Post
Master
posted Hide Post
The Maintain command to have one Maintain perform another Maintain is CALL. You can CALL one Maintain from another and pass stacks of data between them. You just have to remember to INFER the stack in the CALLd Maintain. An example would be:

-* Maintain1
MAINTAIN FILE Movies
For ALL Next Moviecode into MOVSTK
CALL Maintain2 from MOVSTK
END

-Maintain2
MAINTAIN FILE Movies from MOVSTK
Infer Moviecode into MOVSTK
-* Now you can use the data that was loaded into the MOVSTK in Maintain1
END

Mark
 
Posts: 660 | Location: New York | Registered: May 08, 2003Reply With QuoteReport This Post
Member
posted Hide Post
Thank you for your response Mark..

Let me try and if there is any problem I will let you know..

This message has been edited. Last edited by: Shubhi,


WebFOCUS 7, 8
Windows, All Outputs
 
Posts: 4 | Registered: March 20, 2015Reply With QuoteReport This Post
Member
posted Hide Post
Hey Mark,

its wrk...

Now,How we can call multiple stacks from one maintain procedure using CALL statement...


WebFOCUS 7, 8
Windows, All Outputs
 
Posts: 4 | Registered: March 20, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
This is in the training course and in the manuals. You should have training and you should read the manuals. In the base form:

CALL Maintain_procedure [AT server] [KEEP|DROP] [PATH {VAR|LIST}] [FROM var_list] [INTO var_list] [;]


You can CALL from multiple stacks and simple variables.

The items that MUST match in the call and receiving Maintain Commands:
Number of items
Sequence of items
Data Types
Stack Column Names

The items that need not match:
Stack and variable names
Length and precision

If a single Stack cell is passed, it must be received as a simple variable.
You cannot pass variables or stacks using A0 or Stack of formats.
Stacks and variables can be passed back using the INTO option, FROM Stacks and variables are not passed back and remain unchanged in the host process.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Reply With QuoteReport This Post
Master
posted Hide Post
So, as Alan points out, multiple stacks can be passed to and from a CALL'd procedure from the parent. Just list them on the CALL command line...


-* Maintain1
MAINTAIN FILE Movies
For 10 Next Moviecode into MOVSTK1
For 10 Next Moviecode into MOVSTK2
For 10 Next Moviecode into MOVSTK3

CALL Maintain2 from MOVSTK1 MOVSTK2 MOVSTK3
END

-Maintain2
MAINTAIN FILE Movies from MOVSTK1 MOVSTK2 MOVSTK3
Infer Moviecode into MOVSTK1
Infer Moviecode into MOVSTK2
Infer Moviecode into MOVSTK3
-* Now you can use the data that was loaded into the MOVSTK1, NOVSTK2 and MOVSTK3 in Maintain1
END

Mark
 
Posts: 660 | Location: New York | Registered: May 08, 2003Reply With QuoteReport This Post
Member
posted Hide Post
Thank u Alan and Mark...

it really helps.. but can we use multiple data source for transferring data into multiple stacks.Fro ex-


-* Maintain1
MAINTAIN FILE Movies Car


so, here car is the other data source.
How can we put both the data source into the stacks at the same time .


WebFOCUS 7, 8
Windows, All Outputs
 
Posts: 4 | Registered: March 20, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Please check out the manuals and take training.

A simple stack can contain data from any single source.

All you have to do is try.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Reply With QuoteReport This Post
Master
posted Hide Post
I absolutely agree with Alan that taking Maintain training is the best way to learn how to use the product. Having said that, you can use up to 15 different data sources with the Maintain product. Each stack can contain one database path. So...

-* Maintain1
MAINTAIN FILE Movies AND CAR
For 10 Next Moviecode into MOVSTK1
For ALL Next Country Car into CARSTK1

CALL Maintain2 from MOVSTK1 CARSTK1
END

-Maintain2
MAINTAIN FILE Movies AND CAR from MOVSTK1 CARSTK1
Infer Moviecode into MOVSTK1
Infer Country Car into CARSTK1
-* Now you can use the data that was loaded into the MOVSTK1 and CARSTK1 in Maintain2
END

Mark
 
Posts: 660 | Location: New York | Registered: May 08, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to transfer data from one MAINTAIN Procedure to other???

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.