Page 1 of 1

i want to display product wise value using ps and ksds file

PostPosted: Fri Aug 08, 2008 11:26 pm
by pargetz
if my ps file is like this
code   name   nos   um    rate   product code
123    milk   12    lt    10     food
124    ,,     ,,    ,,    ,,     food
,,     ,,     ,,    ,,    ,,     cosm


for food i have to find hw much i have issued value means total of all food items

then i have to display for cosm separate also . so i have to read from ksds file too get the issue rate

Re: i want to display product wise value using ps and ksds file

PostPosted: Sat Aug 09, 2008 3:35 am
by dick scherrer
Hello and welcome to the forums,

Please notice that your "data" has been "Code"d (using the Code tag on the reply panel). This will preserve alignment and make your post much more readable. You should also use the Preview function so you can see how your post will appear to the forum rather than how it appears in the reply editor. When you are satisfied with how your post appears, then click Submit.

for food i have to find hw much i have issued value means total of all food items
then i have to display for cosm separate also
i have to read from ksds file too get the issue rate


Ok, go for it ;)

When you have questions with your code, post the part of the code where you have questions and someone will be able to help. For starters, you know you need to code definitions for the qsam and vsam files as well as whatever is required to show the needed output.

Re: i want to display product wise value using ps and ksds file

PostPosted: Sat Aug 09, 2008 12:54 pm
by pargetz
the output shuld be like this

project code    prodcode   proname       qty   issuevalue
food                123     milk           12        120
food                124      butter        10        100
                                                ********
                                      total      220
                                                 ********
cosm               220        powder     10       300
cosm               221       lipstick    5        50
                                                 ********
                                       total     350
                                                 ********       

so i need the o/p like this for all my project code wise . so i have to get the issued values from the ksds file and remaining fields from ps file . i want write the above o/p in another file too...

Re: i want to display product wise value using ps and ksds file

PostPosted: Sun Aug 10, 2008 4:14 am
by dick scherrer
So, you need to define the 3 files (2 input and the report output). This would be 3 FDs with appropriate elementary level field definitions and some working storage definitions for accumulators, control breaks and report headings.

Then you need the actual code to open the files, read the first sequentially, the vsam randomly, and thd process to create the report and accumulate the totals.

Now it is time for you to code and test.

When something is not working, post pack here with what you have and what is not working.

Obviously, others should not ost code unless it is to help you work on code you have already posted.

The forum is to help you learn, not do the assignment for you.

Re: i want to display product wise value using ps and ksds file

PostPosted: Sun Aug 10, 2008 11:00 am
by pargetz
ya i done codings but for me all product is adding and display . i cant seperate the product wise. even by using dummy variable i cant able to slove .

Re: i want to display product wise value using ps and ksds file

PostPosted: Mon Aug 11, 2008 8:12 am
by dick scherrer
Hello,

Until you more clearly describe the problem, we will not be able to help much.

Telling us "it is not working" does not provide any information for us to use to help you.

If you have some code that compiles and executes (even if incorrectly), you can add some diagnostic code (maybe some diaplay statements) to your program to find where problems exist.