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

Overlay a value in a specific column


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Mon Dec 10, 2007 2:00 pm
Reply with quote

I have a VSAM file and I want to make it's 25 column value='N' of every record irrespective of value in that column.
Back to top
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Mon Dec 10, 2007 2:25 pm
Reply with quote

a Search on "Overlay" would help.
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Mon Dec 10, 2007 2:27 pm
Reply with quote

Hi,
I tried OVERLAY function in SORT. and it worked.
Code:

//SYSIN DD *               
  OPTION COPY               
  OUTREC OVERLAY=(25:C'N') 
/*                         


Please let me know if there is any demerit or precautions of this command if any.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Dec 10, 2007 2:31 pm
Reply with quote

Sudhakar,

Using one vsam both for i/p and o/p is NOT recomended (though you can use).
Back to top
View user's profile Send private message
KMV

New User


Joined: 15 May 2007
Posts: 22
Location: Coimbatore

PostPosted: Mon Dec 10, 2007 2:49 pm
Reply with quote

Sudhakar,
while doing this,
Code:

//SYSIN DD *               
  OPTION COPY               
  OUTREC OVERLAY=(25:C'N') 
/*                       


If u have any packed decimal value from 1 to 24th column,it may become an issue.

correct me, if i m wrong


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

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Mon Dec 10, 2007 2:51 pm
Reply with quote

Thanks Murali.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 4:14 pm
Reply with quote

KMV,

Quote:
If u have any packed decimal value from 1 to 24th column,it may become an issue.


Why do you think so? How does the packed decimal value from 1 - 24 affect this?
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Mon Dec 10, 2007 5:02 pm
Reply with quote

Hi KMV,
i tried above code using file that is having comp-3 data, and ovrlayed a column.
But in the result i could not find anything different other than overlayed column(it's value).
Please let me know if there is anything that should be taken care.
Back to top
View user's profile Send private message
prakash271082

New User


Joined: 09 Sep 2005
Posts: 53

PostPosted: Mon Dec 10, 2007 5:35 pm
Reply with quote

Hi KMV,

I don't think so that we could make use of 'c' in "Overlay", if we have hex value. Hope it's clear. Even, if it has hex value from 1 to 24 column, it won't have impact when we change 25th column value.
Back to top
View user's profile Send private message
KMV

New User


Joined: 15 May 2007
Posts: 22
Location: Coimbatore

PostPosted: Mon Dec 10, 2007 8:07 pm
Reply with quote

Hi
My input file TEST.INPUT.SAMPLE1 is a vsam file with 1204 length.

1-2 2/PS
3-7 5/PS
8-10 3/AN
11-12 2/PS
13-16 4/PS
17-17 1/AN
18-37 20/AN
Wen I try to modify 25th letter as N using

Code:

//STEP2 EXEC PGM=ICEMAN                                 
//SYSOUT DD SYSOUT=*                                   
//SYSPRINT DD SYSOUT=*                                 
//SORTIN DD DSN=TEST.INPUT.SAMPLE1,           
//          DISP=SHR                                   
//SORTOUT DD DSN=TEST.INPUT.SAMPLE2,DISP=SHR 
//SYSIN DD *                                           
  OPTION COPY                                           
    OUTREC OVERLAY=(25:C'N')                           
/*                                                     
//*





21st letter is getting modified as N in TEST.INPUT.SAMPLE2

Is thr any mistake in my JCL? icon_confused.gif



Regards,
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: Mon Dec 10, 2007 10:52 pm
Reply with quote

Quote:
If u have any packed decimal value from 1 to 24th column,it may become an issue.

correct me, if i m wrong


You are wrong. Data in other columns will have no effect on the column being overlaid.

Note that a VSAM file can be processed as either F (fixed length records) or V (variable length records). If it is processed as F, then 25: indicates the 25th position. However, if it is processed as V, DFSORT prepends a 4-byte RDW, so 25: indicates the 21st data position counting the RDW. 29: would indicate the 25th data position counting the RDW.

For information on processing VSAM files as F or V with DFSORT, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/1.8.3.4?SHELF=&DT=20060615185603&CASE=
Back to top
View user's profile Send private message
KMV

New User


Joined: 15 May 2007
Posts: 22
Location: Coimbatore

PostPosted: Tue Dec 11, 2007 9:21 am
Reply with quote

Frank,
Its a fixed length record.




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

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Dec 11, 2007 11:49 am
Reply with quote

KMV,

Quote:
Its a fixed length record.


Are you sure that the input file is a fixed length file?? Please re-check.
Back to top
View user's profile Send private message
KMV

New User


Joined: 15 May 2007
Posts: 22
Location: Coimbatore

PostPosted: Tue Dec 11, 2007 12:06 pm
Reply with quote

Yes Aaru....

Its a fixed length file and i have used that file many times.
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: Wed Dec 12, 2007 12:35 am
Reply with quote

Quote:
Its a fixed length record.


Yes, but did you tell DFSORT that with:

Code:

    RECORD TYPE=F


If not, then DFSORT may assume the records are to be processed as V, not F.

The messages will tell you if the file is being processed as F or V. If the file is being processed as F and an OVERLAY on 25: does an OVERLAY on 21: then something is seriously wrong.

If you're using DFSORT, you'd have to prove it to me by showing me the input, output and //SYSOUT messages. If you're using Syncsort, I can't help you.
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts first column truncated in search result IBM Tools 13
This topic is locked: you cannot edit posts or make replies. Construct new record using specific f... DFSORT/ICETOOL 6
Search our Forums:

Back to Top