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
 

 

Outrec plus condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Outrec plus condition
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Outrec plus condition
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    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 outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 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
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


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