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

Include and Outrec


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sridbhav

New User


Joined: 07 May 2009
Posts: 2
Location: india

PostPosted: Fri Feb 04, 2011 5:20 pm
Reply with quote

Hi , I have the below requirement. The record length of my dataset is 15. I want to search each record in the dataset for a particular word, if found I have to write 1 at the last byte of the output dataset, if not write 0 at the last byte of the output dataset.

Example:
Inpt Dataset ---> 15 Record length
Output dataset ---> 10 recl(first 1-3 bytes and 6-11 bytes of the input dataset and last byte has to be written based on the search)
Search value --> abc

Sample input
123456789777abc
188887778888888

Output expected
1236789770
1887778881
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Feb 04, 2011 5:59 pm
Reply with quote

Hi,

What sort product do you have at your shop?
If it is DFSORT then you could use the below sort job,
Code:

//JS020    EXEC PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//SORTIN   DD DISP=SHR,DSN=WELLS.SORTIN.FB15                 
//SORTOUT  DD DSN=WELLS.SORTOUT.FB10,DISP=OLD                 
//SYSOUT   DD SYSOUT=*                                         
//TOOLIN   DD *                                                 
  COPY FROM(SORTIN) TO(SORTOUT) USING(CTL1)                     
/*                                                             
//CTL1CNTL   DD *                                               
    INREC IFOUTLEN=10,                                         
    IFTHEN=(WHEN=(13,3,CH,EQ,C'abc'),BUILD=(1:1,3,6,6,10:C'0')),
    IFTHEN=(WHEN=(13,3,CH,NE,C'abc'),BUILD=(1:1,3,6,6,10:C'1'))
/*                                                             
//SYSUDUMP DD SYSOUT=*                                         
/*                                                             


Hope it helps.
Back to top
View user's profile Send private message
sridbhav

New User


Joined: 07 May 2009
Posts: 2
Location: india

PostPosted: Fri Feb 04, 2011 6:05 pm
Reply with quote

Its working for me...Thanks a lot..
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Feb 04, 2011 6:07 pm
Reply with quote

Glad to hear it worked icon_smile.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
Search our Forums:

Back to Top