Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy record from different datasets

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 189
Location: INDIA

PostPosted: Wed Apr 09, 2008 8:33 pm    Post subject: Copy record from different datasets
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 Moderator


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

PostPosted: Wed Apr 09, 2008 9:25 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Wed Apr 09, 2008 9:37 pm    Post subject:
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 Moderator


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

PostPosted: Wed Apr 09, 2008 9:42 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Wed Apr 09, 2008 9:51 pm    Post subject:
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 Moderator


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

PostPosted: Wed Apr 09, 2008 10:01 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Wed Apr 09, 2008 10:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us