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

Outrec plus condition


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Mon Jan 16, 2012 4:14 pm
Reply with quote

Hello All,

I have the following requirement.

Input file: Length 50
Output file: Length 50

In my i/p file if 10 byte till 14th byte is either '11111' or '22222' or '33333'
then overwrite the packed decimal value in position 20, with new Packed decimal value.

Note this packed decimal field is date field (in format YYMMDD), so sometimes the value can be '11224' which stands for
YY-> 2001
MM->12
DD-> 24

I want to change the date to 20129 which stands for - 2002-01-29.

I/P date is not constant (It varies based on '11111' or '22222' but output date is constant (20129).Whatever may be the date in the input file for mentioned condition, I need to override with date - "20129" (Packed format).

Here preceding 0 is getting suppressed only for YY, and not for MM and DD.

I hope I have given enough details, If not kindly please let me know of any additional information required.

Thanks for your help.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon Jan 16, 2012 4:22 pm
Reply with quote

Can you post a sample input with different conditions and output expected...

Please use code tags !!
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jan 16, 2012 10:40 pm
Reply with quote

thunderstorm,

Use the following DFSORT control cards.

Code:

//SYSIN    DD *                                         
  SORT FIELDS=COPY                                     
  INREC IFTHEN=(WHEN=(10,5,SS,EQ,C'11111,22222,33333'),
  OVERLAY=(20:+20129,TO=PD,LENGTH=3))                   
//*
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Tue Jan 17, 2012 2:17 pm
Reply with quote

Skolusu,

Thanks a ton! It works as expected. icon_biggrin.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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
This topic is locked: you cannot edit posts or make replies. Control-m JOB executing even when the... Compuware & Other Tools 6
Search our Forums:

Back to Top