MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic allocate array in PLI by using different file layout

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Susan_Yang
Beginner


Joined: 13 Feb 2006
Posts: 9
Topics: 7

PostPosted: Mon Feb 25, 2008 2:16 am    Post subject: Dynamic allocate array in PLI by using different file layout Reply with quote

I want to dynamic allocate array in PLI by using different input file layout. Can anyone help me on it? Thanks a lot!!
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Feb 25, 2008 3:57 am    Post subject: Reply with quote

I am not sure what you are after - can you be a bit more explicit with an example. Are you talking about variables that are an array or are you talking about an array that is part of the input structure?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Susan_Yang
Beginner


Joined: 13 Feb 2006
Posts: 9
Topics: 7

PostPosted: Mon Feb 25, 2008 4:18 am    Post subject: Reply with quote

I want to process several files with different layout by using one common PLI program. For each input file, I need to create an array base on a seperate file layout then go on processing the record in those flies. Thanks for your concern:-)
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Feb 25, 2008 4:31 am    Post subject: Reply with quote

Does the array have a different layout as well, depending on the input file layout? If so then you will have to declare a CONTROLLED array for each possibility and ALLOCATE the required array when you know which file you are processing.

However, the normal way - or at least the way I have seen it done usually - is to have one program per file and just have the differences required for the file being processed.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group