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
 

 

Program logic help on building code/psudocode
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Sun Feb 06, 2011 4:05 pm    Post subject: Program logic help on building code/psudocode
Reply with quote

Hi,

I am little confused about below requirement and need help on building code/psudocode. The requirement is as below

1: File 1 acct-range (account ranges file) contains are as below 9onle 2 records)
0011000 0059999
0081000 0099999

2: File 2 data file ( details files)

Logic required

Want to read file 1 and aslo want to read file 2
If the the accounts matches with account in data file then populates details from details file and create reports with cretain condition.

Please help me to build above logic with with sample code or some way.

Note both the files have key variable of same length.

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Feb 06, 2011 6:27 pm    Post subject: Reply to: Program logic help
Reply with quote

it' s sunday and I am in a good mood ...

let' s assume that each record of file1 contains a range
lets call
recd the key of the record to be processed ( file2 )
key1 and key2 the two keys present in each record of the control file (file1)

Code:
read one record from file 2
read one record from file 1
build key1 and key2 for the first range
if at end of file fill key1 with an high value

do until endoffile(file2)

    if  recd >= key1 & recd <= key2 
        /* match - within range */
        process the record for match
        read one record from file2
        iterate/continue the do
    end if
    if  recd < key1 
        /* not match , below range  */
        process the record for not match
        read one record from file2
        iterate/continue the do
    end if
    if  recd > key2 
        /* not match , above range */
        read another record from file 1
        build key1 and key2 for the next range
        if at end of file fill key1 with an high value
        iterate/continue the do
    end if
end

do end of file processing and cleanup
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Mon Feb 07, 2011 9:57 pm    Post subject:
Reply with quote

icon_rolleyes.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Mon Feb 07, 2011 10:07 pm    Post subject:
Reply with quote

Vasanth,

Please help me as I do not speak smiley face very well.

What does the eye rolling face mean?

Is this a positive contribution to the thread?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Feb 07, 2011 10:10 pm    Post subject: Reply to: Program logic help
Reply with quote

vasanthkumarhb wrote:
icon_rolleyes.gif


maybe he cannot follow/understand a simple pseudocode,
it would be worth to meditate a career shift icon_evil.gif

he made another post with the rolling eyes and somebody ( not me ) deleted it
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 07, 2011 10:44 pm    Post subject: Reply to: Program logic help
Reply with quote

Quote:
he made another post with the rolling eyes and somebody ( not me ) deleted it
I believe that might have been me. . .

IIRC - It added nothing to the topic and i couldn't understand why it was even posted. . .

d
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Mon Feb 07, 2011 10:47 pm    Post subject:
Reply with quote

Maybe a written explaination is in order... Vansanth, anything to say?
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Mon Feb 07, 2011 10:59 pm    Post subject:
Reply with quote

Thanks for your comments Enrico.


Quote:
it would be worth to meditate a career shift
he made another post with the rolling eyes and somebody ( not me ) deleted it


You would have made it still more simpler which i felt. What ever you want you are speaking here???? Crazy....!!

Quote:
Is this a positive contribution to the thread?


Yes
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Feb 07, 2011 11:17 pm    Post subject: Reply to: Program logic help
Reply with quote

Quote:
You would have made it still more simpler which i felt. What ever you want you are speaking here???? Crazy....!!


ok for the language barrier, but could You please translate
and clarify Your comment?

was my pseudocode not clear, wrong, what ... ?
I see there are a few typos, hope You will forgive me!

anyway looks that we are all wasting time here
the TS just disappeared


Quote:
IIRC - It added nothing to the topic and i couldn't understand why it was even posted. . .
to p*** off people willing to help icon_biggrin.gif

edited to add a further comment, not to change history
the TS in the original post asked
Quote:
Please help me to build above logic with with sample code or some way.

I replied with the logic, up to him the code...
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Feb 08, 2011 10:25 am    Post subject:
Reply with quote

I find this forum very very interesting, especially when I see you guys disputing... icon_biggrin.gif

hello, enrico, when did you change your image? I hardly cannot recognize you... icon_arrow.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Feb 08, 2011 2:23 pm    Post subject: Reply to: Program logic help
Reply with quote

well.... we are not disputing ( me at least )
we are just trying to get a non stupid reason for the post with the rolling eyes
and to understand why it is topic related icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 08, 2011 2:53 pm    Post subject:
Reply with quote

Personally I can see absolutely no value in that post, nor in the attempt to validate it.

If you can not contribute constructively then why bother.

You have been warned
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Tue Feb 08, 2011 3:03 pm    Post subject:
Reply with quote

Hi Enrico !

>> we are just trying to get a non stupid reason for the post with the rolling eyes

Do you really believe, you will get a truthful reason? I think it's just a waste of time. Would be nothing else than fucking nonsens.

For my own, i find it interesting, that this is a subject, that is discussed by a few high experienced IT-specialists. The so called creme de la creme of the 21st century.

And for me, working as an well payed consultant, it' its a diverting dissipation. And a chance to proclaim my utter bollocks to this discussion here and getting money for it.

Please don't get me wrong. Don't consider this as an affront. I have the deepest respect for persons who bother oneself about something.

But sometimes it's not worth to do this. :-)

Btw, your pseudo-code was well done, and that on a holy Sunday !!!
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 08, 2011 3:21 pm    Post subject:
Reply with quote

Believing there is no evil in the human being, i guess a wrong emoticon was entered.


And yes, im not myself today.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Tue Feb 08, 2011 3:33 pm    Post subject:
Reply with quote

Goedemorgen Peter !

Youw geloof aan de mensheid behouden geloven dag.

Veel groeten, UmeySan
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Feb 08, 2011 3:36 pm    Post subject: Reply to: Program logic help
Reply with quote

Hi UmeySan!

Quote:
For my own, i find it interesting, that this is a subject, that is discussed by a few high experienced IT-specialists. The so called creme de la creme of the 21st century.
...
Please don't get me wrong. Don't consider this as an affront. I have the deepest respect for persons who bother oneself about something.


No offence at all!

it is really very difficult even for experienced people
to choose the posts to reply and how to reply...
post like this one and like for example
http://ibmmainframes.com/viewtopic.php?t=53336&highlight=
should not have place in a professional forum but...

in this case I was pitying a pour soul and tried to help!

but nobody is ever happy around here

You are rude,
You replied/did not reply to a silly question,
You did not reply/replied to an intelligent question
I feel insulted,
my feet hurt,
my only neuron is tired,
my two only neurons went in a spin loop
You did not explain,
You did not give me the answer I expected
...
it' s urgent
I asked here because my support does not support me (*)

add as many idiotic complaints and whinings as You like

I just lurk and reply while doing something more interesting (*)
and I like ( since I can afford it ) to use sarcasm and unusual words
and even providing useful infos and replies

have a good day UmeySan icon_biggrin.gif
cheers
enrico

(*) for some people the best support would be certainly a rope around the neck icon_biggrin.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 08, 2011 3:37 pm    Post subject:
Reply with quote

Dank jewel UmeySan
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 08, 2011 4:35 pm    Post subject:
Reply with quote

Enrico,

Your last comment about support icon_lol.gif icon_lol.gif icon_lol.gif icon_lol.gif icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Feb 08, 2011 4:43 pm    Post subject: Reply to: Program logic help
Reply with quote

that' s what I would call dark/gothic sarcasm
Back to top
View user's profile Send private message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Tue Feb 08, 2011 6:59 pm    Post subject: Reply to: Program logic help
Reply with quote

Hi,

Can anyone of above help me to understand the logic little more clear as I am still confused?

I have 2 files

1st file just have account range (1000 9999 etc..)
2nd file with data

if anyof the account in the data file match with the account in the account range then perform some thing etc.

just need help on iteration perform part.

Please help.
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 -> COBOL Programming All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


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