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
 
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 OVERLAY different to INCREC ge... Joerg.Findeisen SYNCSORT 8 Fri Apr 27, 2018 2:11 am
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

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