Page 1 of 1

Need help in design the solution

PostPosted: Tue Dec 22, 2015 3:27 pm
by ritnihi
Hi,

Could you please suggest how I should define the logic for my below requirement in Pl/1. I have very minimal knowledge in PL/1.

1) I have a file for which each Sequence no, I need to find the Branch number in one table TAB1.

File 1:
Seq-No Reg-No
100    1111
100    2222
101    3333
102    4444


TAB1
Seq-No Branch-No
100    12345
100    12121
102    13131

2) Need to concatenate both like Reg-No || Branch and search in another table. If it is not found then write to an error file.
For ex: 1111 || 12345
1111 || 12121
2222 || 12345
2222 || 12121

Kindly suggest

Re: Need help in design the solution

PostPosted: Tue Dec 22, 2015 3:36 pm
by prino
So how did you get this job? You need to program in PL/I but don't know the language? Maybe you should ask your employer to send you on a PL/I course, and on a course of logical thinking...

Re: Need help in design the solution

PostPosted: Tue Dec 22, 2015 3:45 pm
by enrico-sorichetti
why not split the process into two parts
use sort to create a file with the cartesian product of the input files
( search the forum with cartesian product to find the relevant code examples )

after that the second part of the task should be simple also for a very beginner

while I agree that writing a program for the cartesian product might be complicated
( that's why I suggest a sort solution )
You should be able to carry on the second part without help

Re: Need help in design the solution

PostPosted: Tue Dec 22, 2015 4:10 pm
by ritnihi
Thanks Enrico for some sensible answer.

People should think twice before posting any query in this group as everyone is over talented that they don't want to answer the junior level questions properly.

Re: Need help in design the solution

PostPosted: Wed Dec 23, 2015 4:58 am
by NicC
As a 'junior' you should not be designing the program - it should be designed and given to you to code. Requirements do NOT equal design.

If you have designed programs in other procedural languages then use that experience. The design should, basically, be non-language dependent.