View previous topic :: View next topic
|
Author |
Message |
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
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 |
|
|
donevin
New User
Joined: 07 Jun 2005 Posts: 70 Location: South Africa
|
|
|
|
a Search on "Overlay" would help. |
|
Back to top |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Sudhakar,
Using one vsam both for i/p and o/p is NOT recomended (though you can use). |
|
Back to top |
|
|
KMV
New User
Joined: 15 May 2007 Posts: 22 Location: Coimbatore
|
|
|
|
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 |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
Thanks Murali. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
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 |
|
|
prakash271082
New User
Joined: 09 Sep 2005 Posts: 53
|
|
|
|
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 |
|
|
KMV
New User
Joined: 15 May 2007 Posts: 22 Location: Coimbatore
|
|
|
|
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?
Regards, |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
KMV
New User
Joined: 15 May 2007 Posts: 22 Location: Coimbatore
|
|
|
|
Frank,
Its a fixed length record.
Regards, |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
KMV
New User
Joined: 15 May 2007 Posts: 22 Location: Coimbatore
|
|
|
|
Yes Aaru....
Its a fixed length file and i have used that file many times. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Its a fixed length record. |
Yes, but did you tell DFSORT that with:
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 |
|
|
|