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
 

 

List combinations of N items

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: List combinations of N items
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7309

PostPosted: Sat Feb 15, 2014 3:48 pm    Post subject: Reply to: List combinations of N items
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    Post subject: Reply to: List combinations of N items
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    Post subject: Reply to: List combinations of N items
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts reorder screeNS using SWAP LIST? mrsidhu12 TSO/ISPF 5 Thu Sep 01, 2016 2:19 pm
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am


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