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
 
Repeating input records for variable times depending on cond

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Fri Jul 31, 2015 4:16 pm    Post subject: Repeating input records for variable times depending on cond
Reply with quote

Hi,

I have a requirement as below for which I would need a help on OUTIFIL REPEAT = n where n varies on a condition as stated below:

I/P : FB LREC L80

Record/date
a2015-01-01
b2015-01-02
c2015-01-03

O/P: FB LRECL 80

Records should be repeated based on the date difference no of times between the input date & current date:

For e.g if Current Date = 2015-01-03

Record/date
a2015-01-01
a2015-01-01
a2015-01-01
b2015-01-02
b2015-01-02
c2015-01-03

Date in the I/P file and O/P file would be at a fixed position.

Could you please suggest a possible way to conditionally repeat the records with OUTFIL REPEAT parameter or otherwise.

Regards,
sks
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Jul 31, 2015 4:47 pm    Post subject: Reply to: Repeating input records for variable times depending on cond
Reply with quote

You've been around long enough to know you should use the Code tags.

REPEAT works for each record in the OUTFIL group. The value cannot be changed.

You can use the slash-operator (/) with multiple IFTHEN=(WHEN=(logicalexpression). If you have lots of possible differences, then you can generate the code. If your differences may be huge, then you'll probably run out of space for the control cards and have to use a more general-purpose programming language (which is also possible right from the start).
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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