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
 

 

Need an explaination for outfil overlay

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 83
Location: India

PostPosted: Mon Nov 19, 2007 4:47 pm    Post subject: Need an explaination for outfil overlay
Reply with quote

Hi when I run this JCL :
Code:
//STEP1 EXEC PGM=SORT                                   
//SYSOUT DD SYSOUT=*                                     
//SORTIN DD *                                           
AAA111111BBB                                             
/*                                                       
//SORTOUT DD DSN=&&TEMP,DISP=(NEW,PASS),SPACE=(CYL,(1,1))
//*SORTOUT DD SYSOUT=*                                   
//SYSIN  DD *                                           
  OPTION COPY                                           
  OUTFIL BUILD=(1,3,6C'0',C'{',10,3)                     
/*                                                       
//STEP3 EXEC PGM=SORT                                   
//SYSOUT DD SYSOUT=*                                     
//SORTIN DD DSN=&&TEMP,DISP=(OLD,PASS)                   
//SORTOUT DD SYSOUT=*                                   
//SYSIN DD *                                             
  OPTION COPY                                           
  OUTFIL OVERLAY=(4:4,6,ZD,ADD,+03,M11,LENGTH=06)       
/*

I get the following o/p:
Code:
AAA000003{BBB


But when I use the overlay statement as:
Code:
OUTFIL OVERLAY=(4,6,ZD,ADD,+03,M11,LENGTH=06)

I get the o/p as:
Code:
000003000{BBB


May I know why this happens?
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Nov 19, 2007 5:29 pm    Post subject:
Reply with quote

When you specify OVERLAY without the destination position like this
Code:
OUTFIL OVERLAY=(4,6,ZD,ADD,+03,M11,LENGTH=06)

The default destination would be position 1, so the data in the position 1 in your o/p is overlayed.

Where as when you specify the destination position "4:" like this
Code:
OUTFIL OVERLAY=(4:4,6,ZD,ADD,+03,M11,LENGTH=06)
the o/p is overlayed in position 4.

2.4.14 Reformatting Records with OVERLAY

OVERLAY SYNTAX
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 83
Location: India

PostPosted: Mon Nov 19, 2007 5:52 pm    Post subject:
Reply with quote

Hi Krisprems

Quote:
The default destination would be position 1, so the data in the position 1 in your o/p is overlayed


In this case the o/p should have been:

Code:
000003111{BBB

isn't it?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Nov 19, 2007 6:13 pm    Post subject:
Reply with quote

Learncoholic
o/p of your first step is
Code:
AAA000000{BBB
So,
position 1-6 you have => AAA000
remaining data => 000{BBB
Then in the second step when you specify
Code:
OUTFIL OVERLAY=(4,6,ZD,ADD,+03,M11,LENGTH=06)

ie.., 000000 + 3 = 000003
and the default o/p position is 1, so
position 1-6 you will have => 000003 in the place of AAA000 , followed by
remaining data => 000{BBB.

Final o/p would be
Code:
000003000{BBB
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 83
Location: India

PostPosted: Mon Nov 19, 2007 6:20 pm    Post subject:
Reply with quote

Hi krisprems
I got it. Thank you so much
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Nov 19, 2007 6:27 pm    Post subject:
Reply with quote

You are welcome icon_cool.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Overlay with right shift Bill Woodger DFSORT/ICETOOL 3 Thu Jan 28, 2016 7:49 pm
No new posts Overlay with WHEN=Group not working krsenthil85 DFSORT/ICETOOL 7 Wed Oct 21, 2015 4:00 am
No new posts Merge two files with some replace/ove... dheeraj.ramchandani DFSORT/ICETOOL 10 Thu Sep 03, 2015 7:59 pm
No new posts OUTREC on OUTFIL error rocky_balboa DFSORT/ICETOOL 4 Thu Aug 27, 2015 10:26 am


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