View previous topic :: View next topic |
Author |
Message |
Susan_Yang Beginner
Joined: 13 Feb 2006 Posts: 9 Topics: 7
|
Posted: Mon Feb 25, 2008 2:16 am Post subject: Dynamic allocate array in PLI by using different file layout |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Feb 25, 2008 3:57 am Post subject: |
|
|
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 |
|
 |
Susan_Yang Beginner
Joined: 13 Feb 2006 Posts: 9 Topics: 7
|
Posted: Mon Feb 25, 2008 4:18 am Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Feb 25, 2008 4:31 am Post subject: |
|
|
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 |
|
 |
|
|