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

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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: 6966
Location: porcelain throne

PostPosted: Mon Feb 28, 2011 8:39 pm
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
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 Developer


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

PostPosted: Tue Mar 01, 2011 12:40 am
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:

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 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 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top