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

List combinations of N items


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

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Sat Feb 15, 2014 1:01 pm
Reply with quote

Hi,

I have a requirement to generate test data with input like below

Code:

Para_1  Var_1  A
Para_1  Var_1  Test
Para_1  Var_2  B
Para_1  Var_2  Test
Para_1  Var_3  C
Para_1  Var_3  Test
Para_1  Var_4  D
Para_1  Var_4  Test


Expected output is all combinations of each Var*.
Var* should be of 10 bytes (if text is less than 10 bytes, padd it with spaces)
A, B, C, Text... should be of 60 bytes (if text is less than 60 bytes, padd it with spaces)

Expected Output is:

Code:

Para_1Var_1...(Total 10 bytes)..A (Total 60 bytes)...Var_2....B...Var_3...C
Para_1Var_1...(Total 10 bytes)..Test (Total 60 bytes)...Var_2....B...Var_3...C
Para_1Var_1...(Total 10 bytes)..Test (Total 60 bytes)...Var_2....Test...Var_3...C
......
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Feb 15, 2014 3:48 pm
Reply with quote

Can you clarify your sample data, like make everything four bytes, separated by blanks, and ensure that all your combinations are covered in your sample data?
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Sat Feb 15, 2014 7:14 pm
Reply with quote

Code:

Field_1(10 bytes long)       Field_2(10 bytes long)         Field_3(60 bytes long)
Para_1                             Var_1                                A
Para_1                             Var_1                                Test
Para_1                             Var_2                                B
Para_1                             Var_2                                Test
Para_1                             Var_3                                C
Para_1                             Var_3                                Test
Para_1                             Var_4                                D
Para_1                             Var_4                                Test


Sample Output : There can be more combinations
Code:

Para_1                Var_1       A              Var_2               B            Var_3     C       Var_4     D
Para_1                Var_1       Test           Var_2               B            Var_3     C       Var_4     D
Para_1                Var_1       Test           Var_2               Test         Var_3     C       Var_4     D
Para_1                Var_1       Test           Var_2               Test         Var_3     Test    Var_4     D
Para_1                Var_1       Test           Var_2               Test         Var_3     Test    Var_4     Test

Para_1                Var_1       A              Var_2               Test         Var_3     Test    Var_4     Test
Para_1                Var_1       A              Var_2               B            Var_3     Test    Var_4     Test
Para_1                Var_1       A              Var_2               B            Var_3     C       Var_4     Test
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Feb 18, 2014 2:55 am
Reply with quote

kalukakkad,

How many places are you going to post the same question?
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 How to create a list of SAR jobs with... CA Products 3
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts List of quiesced jobs JCL & VSAM 3
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
Search our Forums:

Back to Top