Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1522
Location: Chennai

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: 1522
Location: Chennai

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
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us