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
 

 

How to override first 5 bytes alone???

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

New User


Joined: 29 Dec 2005
Posts: 7

PostPosted: Fri May 25, 2007 8:24 am    Post subject: How to override first 5 bytes alone???
Reply with quote

Hi all,

I have two files with the length of 100 and with 3 thousand records.
I have to copy the first 5 bytes of first file to the second file, but other values in the second file should not be disturbed.

Eg:
Input

FIle1 - AA111111
BB222222

File 2 - XX333333
YY555555

I want the output as below

File2 - AA111333
BB222555

Please advice.

Thank You.
Abirami.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri May 25, 2007 10:08 am    Post subject: ICETOOL SOLUTION
Reply with quote

abirami_2006
ICETOOL solution for your question is as follows
Code:
//STEP001  EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD *                                                       
AA111111                                                               
BB222222                                                               
/*                                                                     
//IN2      DD *                                                       
XX333333                                                               
YY555555                                                               
/*                                                                     
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT      DD SYSOUT=*                                                 
//TOOLIN   DD *                                                       
 COPY FROM(IN1)  TO(TMP1) USING(CP01)                                 
 COPY FROM(IN2)  TO(TMP1) USING(CP02)                                 
 SPLICE FROM(TMP1) TO(OUT) ON(20,8,PD) KEEPNODUPS -                   
  WITHEACH   WITH(6,3) USING(CP13)                                     
/*                                                                     
//CP01CNTL DD   *                         
  OUTREC FIELDS=(1:1,8,20:SEQNUM,8,PD)     
/*                                         
//CP02CNTL DD   *                         
  OUTREC FIELDS=(6:6,3,20:SEQNUM,8,PD)     
/*                                         
//CP13CNTL DD   *                         
  OUTFIL FNAMES=OUT,OUTREC=(1,8)           
/*                                         


The output OUT should contain
Code:
AA111333
BB222555
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri May 25, 2007 10:16 am    Post subject:
Reply with quote

Abi,

Go through the following previous post -

http://www.ibmmainframes.com/viewtopic.php?t=19629

I hope this suits your requirement.
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Fri May 25, 2007 10:23 am    Post subject:
Reply with quote

Hi,

try this logic below.

1. add sequence number to both the i\p files
2. Join the records from both the files using SPLICE based on sequence number
3. Using OVERLAY function copy the First 2 char which will be at end of temporary o\p from above step
4. Using BUILD omit the fields u added in 2nd step also the sequence number

Regards,
Mani
Back to top
View user's profile Send private message
abirami_2006

New User


Joined: 29 Dec 2005
Posts: 7

PostPosted: Sat May 26, 2007 10:26 am    Post subject:
Reply with quote

Thanks a lot. I got the output.

Regards,
Abirami
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 Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 pm
No new posts FIXED BIN (31) and FIXED BIN (63) - H... sundarkudos PL/I & Assembler 4 Thu Nov 05, 2015 1:11 pm
No new posts Symbolic OverRide within a 'Include' ... Sysaron JCL & VSAM 7 Thu Aug 27, 2015 10:51 pm
No new posts Help in File Tailoring services ( Ove... thesumitk TSO/ISPF 8 Wed Jun 17, 2015 12:04 pm


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