Need help in design the solution



IBM's cross-platform compiler PL/I for MVS, VM & VSE, OS/390 and Enterprise PL/I for z/OS

Need help in design the solution

Postby ritnihi » Tue Dec 22, 2015 3:27 pm

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
ritnihi
 
Posts: 9
Joined: Wed Dec 28, 2011 5:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help in design the solution

Postby prino » Tue Dec 22, 2015 3:36 pm

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...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: Need help in design the solution

Postby enrico-sorichetti » Tue Dec 22, 2015 3:45 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Need help in design the solution

Postby ritnihi » Tue Dec 22, 2015 4:10 pm

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.
ritnihi
 
Posts: 9
Joined: Wed Dec 28, 2011 5:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help in design the solution

Postby NicC » Wed Dec 23, 2015 4:58 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to PL/I