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
 

 

Overlay a value in a specific column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Overlay a value in a specific column
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    Post subject:
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    Post subject: Reply to: SORT query.
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: 1439
Location: Bangalore,India

PostPosted: Mon Dec 10, 2007 2:31 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Mon Dec 10, 2007 4:14 pm    Post subject: Reply to: Overlay a value in a specific column
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    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon Dec 10, 2007 10:52 pm    Post subject:
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:

http://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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Dec 11, 2007 11:49 am    Post subject: Reply to: Overlay a value in a specific column
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    Post subject:
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 Moderator


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

PostPosted: Wed Dec 12, 2007 12:35 am    Post subject:
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    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 Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Route a product's job to specific lpar vasanthz All Other Mainframe Topics 9 Thu Mar 02, 2017 2:22 am
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


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