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
 

 

Include and Outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Include and Outrec
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: 1456
Location: Azeroth

PostPosted: Fri Feb 04, 2011 5:59 pm    Post subject:
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    Post subject:
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: 1456
Location: Azeroth

PostPosted: Fri Feb 04, 2011 6:07 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts OUTREC RDW NOT INCLUDED krsenthil85 SYNCSORT 10 Fri May 06, 2016 3:22 am


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