IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy record from different datasets


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Wed Apr 09, 2008 8:33 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 09, 2008 9:25 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Wed Apr 09, 2008 9:37 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 09, 2008 9:42 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Wed Apr 09, 2008 9:51 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 09, 2008 10:01 pm
Reply with quote

Are you just explaining what you're doing or are you asking a question?
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Wed Apr 09, 2008 10:09 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top