Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Help me with the logic

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Surekha Kareti

New User


Joined: 26 May 2009
Posts: 3
Location: Bangalore

PostPosted: Thu Oct 21, 2010 4:36 am    Post subject: Help me with the logic
Reply with quote

Hi, Please find my requirement and help me coding in program.

1) Program A calls my pgm using two parameters. They are
a) I1 - x(01) values are O, W, H (Header), L (line) , C
b) I2 - X(60)
Program A moves as below:
MOVE WS-NAME TO I2
MOVE 'H' TO I1
Calls my program

after that again it moves student id and calls like this it calls.

2) My program receives I1 & I2 and should write an output file which is of length 256. This file should have header and line items.

Could some one please help me in writing the logic.

Thanks
SR
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Oct 21, 2010 5:15 am    Post subject:
Reply with quote

Your basic problem is that your requirements are not clear. If the requirements are adequately stated, usually the program becomes a fairly simple translation process. Examples of issues with your post:

1. Where did this come from -- the only mention in your post of "student id"?
Quote:
after that again it moves student id and calls like this it calls.

2. Why is the output file 256 bytes long -- shouldn't it be a multiple of 60?

3. Will you only have one header?

4. How many detail lines can you have?

5. How do the O, W, C values figure in your program?

6. Why do you need a subprogram for this anyway -- shouldn't you just do it all in program A?

7. Will program A call your program to signal the end of the processing? If not, how will your program be able to write out the last record?

8. Are you supposed to be accumulating the detail lines into a single output record -- or should each detail be written as a line? If so, what do the extra 206 bytes consist of in the record?

9. Will the I2 variable always have 60 bytes of data?

and that's a start at helping you come up with the logic.
Back to top
View user's profile Send private message
Surekha Kareti

New User


Joined: 26 May 2009
Posts: 3
Location: Bangalore

PostPosted: Thu Oct 21, 2010 7:53 am    Post subject: Reply to: Help me with the logic
Reply with quote

Thanks for your reply. I am answering for all your questions in sequence also attaching the output format how it should look like.

1) I just mentioned Student ID as an example there are many fields.

2) Output is not a multiple of 60, the length is 256. When program A reads input file it moves student id, name etc etc to I2 and calls my program to write output file.

3) Only one header

4) Lines should not be morethan 22

5) O - File to open, W- to write file, C - close a file

6) Its Client req thats why writing a module

7) Program A signals that my pgm is end of process

8) Please see attached

9) I2 is 60 bytes field but student id or name or etc is moving into it may not be 60bytes.

Please let me know the thoughts
Thanks
SR
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Oct 21, 2010 1:39 pm    Post subject: Reply to: Help me with the logic
Reply with quote

(1) do not post attachments, (2) do not post screen shots,
(1) not everybody can see them
(2) is just a waste of resource, the same info can be conveyed with a text cut and paste and the code tags

if You want help it would be wiser to learn to describe clearly the requirements
how does the screen shot relate to Your issue ?
Back to top
View user's profile Send private message
Surekha Kareti

New User


Joined: 26 May 2009
Posts: 3
Location: Bangalore

PostPosted: Thu Oct 21, 2010 8:17 pm    Post subject: Reply to: Help me with the logic
Reply with quote

I am sorry, I am new. Thanks
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: Thu Oct 21, 2010 10:51 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

Quote:
I am sorry
Not to worry - someone will let you know when you post astray. . . icon_smile.gif

Quote:
I am new.
Which makes being clear quite important.

Quote:
Thanks
You're welcome.

Suggest you start over and post some sample input data. Then show the exact output you want from the sample input. Use copy/paste and the "Code" tag to preserve alignment and improve readability. There is a Preview function so you can see your post as it will appear to the forum rather than how it looks in the Reply Editor. Once the appearance is as you want, Submit. If you copy/paste screen text, you should not manually change the spacing (this will corrupt the alignment).

Post the rules for getting from the input to the output. The sample data should contain data that demonstrates each rule.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Wildcard logic in COBOL dudenithy COBOL Programming 13 Thu Sep 01, 2016 7:36 pm
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1:22 am
No new posts Need a logic to validate the data in ... sandeep kumar302 COBOL Programming 17 Mon Feb 01, 2016 3:30 pm
No new posts Tricky sort logic required pgopi92 DFSORT/ICETOOL 3 Mon Jan 25, 2016 3:29 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us