Hello,
rakeshsneha1212 wrote:...But this is not generic i mean every time i will have to create a new copy book for every different datasets(which has different copy book layout). Can we not make this automated ??
Ok, before we really dive into it, let us take a step back and understand few basic things, because we are talking 'automation' here, and going by the looks of this thread we are really not getting anywhere in terms of explaining or understanding the complexity of the problem at hand. You need to understand that EVERYTHING can be done, provided one is able to think of an algorithm - which happens only if we understand the problem first.
Forget REXX, *SORT, COBOL, COPYBOOK etc. for a few moments, ponder and try answering a few questions to yourself:
a. No matter what the source, how do you differentiate between the different datasets (and subsequently their 'comma-separated-layouts') during run-time?
b. If you are able to figure out how you'll go about point- a, then program your code in such a way that --> IF-DS Type-Identified-MOVE-DATA-To-The-Linked-Layout
If you choose COBOL, then you can have all the comma-separated-layouts coded in the program at one go, at different '01' levels (extremely basic structure), OR you can play around different levels - a choice totally dependent on your programming proficiency.
The program (COBOL or otherwise) needs to be (coded) intelligent enough to figure out which layout needs to be populated against which form of data.
Note, that this same concept will be required (if I am not wrong) for almost all structured programming languages, because unless coded, a program will never know where to insert a comma/character. As far as *SORT is considered, I'd recommend you revisit the current constructs and analyze how your site is currently handling the different datasets as on today, as you might be looking at a solution.