Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 201
Location: USA

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: 201
Location: USA

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: 201
Location: USA

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: 201
Location: USA

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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us