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
 

 

Inserting data of file-1 to data of file-2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Mon Feb 28, 2011 6:12 pm    Post subject: Inserting data of file-1 to data of file-2
Reply with quote

Would you please help me out?

File-1 (LRECL=2)

File-2(LRECL=28)


I want inset 2 bytes of File-1 to 10, 11 th positions of File-2, with out changing rest of the record (only 10, 11 positions of the file-2 have to be replaced with file-1 data)
Back to top
View user's profile Send private message

vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Mon Feb 28, 2011 8:25 pm    Post subject:
Reply with quote

When I used OUTREC OVERLAY option, data of file-2 data is getting changed
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Mon Feb 28, 2011 8:39 pm    Post subject:
Reply with quote

show us
  • input datasets (use code tags)
  • expected output
  • results of your job - output file
  • jcl (include DFSORT control cards)
Back to top
View user's profile Send private message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Mon Feb 28, 2011 10:19 pm    Post subject:
Reply with quote

The job I have used

//STEP01 EXEC PGM=SORT
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=S9TEST.ZZF.ALLZONES.L2011.D02283.XX
//SORTOUT DD DSN=TEST.VEK3W0.ZZF.L2011.BKP1,DISP=OLD
//SYSIN DD *
OPTION COPY
OUTREC OVERLAY=(1,9,10:1,2,12,17)
/*



I/P file-1

S9TEST.ZZF.ALLZONES.L2011.D02283.XX
Code:
--
**
12
12



beofre submitting the job
I/P file-2

Code:
----+----1----+----2----+---
****************************
L001  çñæ ¤çñæ&q@PROFGEN11PS
L00130çñæ  çñæ&q@PROFGEN11PS


0btained file after submitting I/P fil-2

Code:
----+----1----+----2----+---
12       12                 
12       12                 


expected I/P fil-2 afer job submission
Code:
----+----1----+----2----+---
****************************
L001  çñæ12çñæ&q@PROFGEN11PS
L00130çñæ12çñæ&q@PROFGEN11PS
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: Tue Mar 01, 2011 12:40 am    Post subject:
Reply with quote

You can't do what you want the way you're trying to do it.

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT                                   
//SYSOUT DD SYSOUT=*                                 
//IN1 DD DSN=...  input file 1 (FB/2)                   
//IN2 DD DSN=...  input file 2 (FB/28)                   
//SORTOUT DD DSN=...  output file (FB/28)               
//SYSIN DD *                                         
  JOINKEYS F1=IN1,FIELDS=(3,8,A),SORTED,NOSEQCK     
  JOINKEYS F2=IN2,FIELDS=(29,8,A),SORTED,NOSEQCK     
  REFORMAT FIELDS=(F2:1,9,F1:1,2,F2:12,17)           
  OPTION COPY                                       
/*
//JNF1CNTL DD *                                     
  INREC OVERLAY=(3:SEQNUM,8,ZD)                     
/*
//JNF2CNTL DD *                                     
  INREC OVERLAY=(29:SEQNUM,8,ZD)                     
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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