View previous topic :: View next topic
|
Author |
Message |
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Hi all
Is there any way to copy record1 from dataset1 and record2 from dataset2 to a single dataset dataset3.
Regards
Amar |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//*** Use a MOD data set for //OUT
//OUT DD DISP=MOD,DSN=... output file
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CTL1)
COPY FROM(IN2) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
OPTION STOPAFT=1
/*
|
|
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Frank,
Thank you very much for the reply. My basic requirement is I need to read a record if a condition is met in the previous record.I have posted in the other thread. But I didnt get the answer.
Thankyou
Amar. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Why did you post this question if that's not the solution you're looking for?
I don't really see how this question relates to the other question.
I've asked you some questions in the other thread since it isn't clear what you want to do exactly. I can't take that other thread any further until you answer the questions and clarify what you want to do. |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Frank,
I have reason to post this question. Actually as I said I need to read a record if it has any condition met in the previous record. Once we read the next record what actually we need to do is we need to format the record in a desired manner and we need the unformatted record too. So I thought of implementing that like first I will write the formatted record to a temporary dataset1 and unformatted record to another temporay dataset2. After that I will take the first formatted record from the temporary dataset1 and write it to the actual output dataset and after that first unformatted record from the temporary dataset 2 and write it as second record of actual output dataset.
I hope I am clear.
Regards
Amar |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Are you just explaining what you're doing or are you asking a question? |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Frank,
I posted this thread since I don't know how do the end part of the above process I explained. So I posted question requesting how to copy records from different datasets to this output dataset.
I replied since you said
Quote: |
I don't really see how this question relates to the other question. |
So I thought I will reply you.
Regards
Amar |
|
Back to top |
|
|
|