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
 

 

how to move fields in a report program column by column
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
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 11:53 am    Post subject: how to move fields in a report program column by column
Reply with quote

The requirement is I have to read an input file, check for some if condition
and if the condition is satisfied I have to populate this report column by column.
The detail information on the report will load in a column by column fashion beginning with the first column and will only proceed to subsequent columns if the number of detail entries dictate.(As per my specs)

I would like to know how to move the fields, how do I check for the EOF column, EOF page.
what other things are to be looked into. I have not been into coding anytime prior to this. I might come up with some very basic queries, icon_biggrin.gif

QS QS QS QS

XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX
XXXX XXXX XXXX

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

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Sep 11, 2007 12:32 pm    Post subject:
Reply with quote

Manjusha,

Provide some examples for better understanding. Your requirement is not clear.
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 12:45 pm    Post subject:
Reply with quote

Thanks Murali,

I have to write a program which also has a report program. The specs tha I got says I need to populate the report column by column as i mentioned in my prev mail....oops looks like the alignment of my query changed in my post. QS is the field name of the report. There are 4 such field. After reading a flat file and based on some conditions I need to populate the fields.

let me know what kind of info do you need. Being new to it, I guess I am not able to put the query in a good order.....

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

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Sep 11, 2007 12:49 pm    Post subject:
Reply with quote

manjusha,

Quote:
I guess I am not able to put the query in a good order.....

Instead of putting 'XXXX' values, why dont you give some real values and explain your req.
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 12:53 pm    Post subject:
Reply with quote

Are we allowed to attach the spec in this forum.....
Back to top
View user's profile Send private message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Tue Sep 11, 2007 1:20 pm    Post subject: Reply to: how to move fields in a report program column by c
Reply with quote

Manjusha,

Welcome to the forum. Please read the forum rules before posting anything on the forum. This is very important.

u r nt supposed to put the company docs on the forum. this will disclose company confidential things to public which company may not like. In worst case company may sack you. this only for ur information. u can ask moderator to remove the link frm the forum.

Explain your problem/query in short using some dummy data which helps members to understand the problem u r facing and give u solution on that.
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 1:24 pm    Post subject:
Reply with quote

Thanks sandy for the info
Back to top
View user's profile Send private message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Tue Sep 11, 2007 1:29 pm    Post subject: Reply to: how to move fields in a report program column by c
Reply with quote

Hi,

u can display the data columnwise in simple way.

define the cols in the WS section and move the data in the particular condition loop and write after moving that record.

like

01 REPORT.

03 COL1 PIC 9(2).
03 FILLER X(5).
03 COL2 PIC 9(2).
03 FILLER X(5).
03 COL3 PIC 9(2).

in conditional para.

MOVE 01 TO COL1
MOVE 02 TO COL2
MOVE 03 TO COL3


WRITE REPORT.

I think this solve ur purpose.
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 2:30 pm    Post subject:
Reply with quote

Hi,

Thanks a lot for your quick reply.

I had requested the moderators to remove the Specs.I can still see it:)icon_smile.gif

coming to my query, since it is report pgm, I wanted to know wud my pgm make sure that we have finished populating one column and get to the next column, so on and so forth...

Regards,
manjusha
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 3:17 pm    Post subject:
Reply with quote

hi,

I think what you are asking is not satisfying the coding standar of cobol.I guess if you are asking like..

suppose

empname no. add
a
b
c
i mean to say if you are asking to populate first column totally and then move to next column .is it like that?
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 3:34 pm    Post subject:
Reply with quote

hi Manjusha,
I think after reading the input file,Based on some condition you have to move 1st records or datas of specific column and then you can perform on
the second record and so on .I don't think you first populate the one
column then move to second and so on.Am i clear to you?
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 3:50 pm    Post subject:
Reply with quote

Thanks for your reply,

yes I need to populate the first column and then thenext column so on and so forth. I have four such columns....

what I had been thinking was reading the input file if the condition is satisfied I shall move the reqd record to a W.S.S variable say Q1S1 and then read the second record move it to Q2S2 and so on....and when Q4S4 is moved I will write the record.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 4:04 pm    Post subject:
Reply with quote

Hi,
if i got your reply correctly as i said you have to perform operation on the
first record and then can move on to the second record.
like after reading the first record move the data in the corresponding ws variables Q1S1 to Q1S4.
And then write the record.afterward read the second record and perform the operatin.I think
you are more confused with the cobol coding than to requirement.Why are you confusing yourself to populate the first column then second and
so on.
see you can perform operation only on the record you are reading.
i guess you are clear with what is a record is in a cluster or file?

Am i clear to you.Base line is that You can perform operation on the
record which you have read that time.
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 4:12 pm    Post subject:
Reply with quote

thanks a lot....

I am confused with requirement as well as the cobol coding I guess:)icon_smile.gificon_smile.gif

My requirement is to ....my report will load column by column

The detail information on the report will load in a column by column fashion beginning with the first column and will only proceed to subsequent columns if the number of detail entries dictate.(As per my specs) [/quote]
.....since it will load column by column I cant write it unless a page is complete...isn't it...

looks like I am confused and confusing others as well....
Back to top
View user's profile Send private message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Tue Sep 11, 2007 4:15 pm    Post subject: Reply to: how to move fields in a report program column by c
Reply with quote

Above logic will write all the cols at a time, so not worry abt individual cols icon_smile.gif
Back to top
View user's profile Send private message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Tue Sep 11, 2007 4:25 pm    Post subject: Reply to: how to move fields in a report program column by c
Reply with quote

I think reports are never written like wht u demand. icon_eek.gif they are processed account by account and all the cols are populated at the same time otherwise ur program will not be of any use if u are trying to populate whole cols at a time this is bcoz:

1. Program has to process all A/C's for each col.
2. In that case u need to store all the results in the array or something which will consume unnecessary space and time.
3. Total job will take lot of time and space which is not permissible.

Try to figure out exact req and code it with less effort and generalize way.
icon_cool.gif
Back to top
View user's profile Send private message
manjusha.singh

New User


Joined: 14 Jun 2005
Posts: 16
Location: bangalore

PostPosted: Tue Sep 11, 2007 4:35 pm    Post subject:
Reply with quote

thanks so much......I shall try to do it the way you suggested. The mainframe link is down for now:)icon_smile.gif
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 5:54 pm    Post subject:
Reply with quote

are your input files are more than one.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 5:58 pm    Post subject:
Reply with quote

hi,
i am absolute agree with Help-Me-Out.That is what i am trying to explaining you.Dont bother about column,Process on each record.if required i can give u smail example.
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: Tue Sep 11, 2007 7:41 pm    Post subject:
Reply with quote

Hello,

Quote:
how do I check for the EOF column, EOF page.
There is no need to check for an "EOF column". When you read a record, all of the fields are automatically brought into your program. I am not clear on what you mean by an "EOF page".

As was mentioned before, if you post a small amount of sample data and how you want the output to look, we will better understand your requirement.

If you want to post some of your spec, you can post the requirement without posting any "company info". Make your spec so that it could fit "anywhere". Also, it is best not attach, but rather include the info inline. Several of our better answer providers are not permitted to download attachments.

You mentioned that your post lost alignment. If you use the "Code" tab near the top of the Reply panel, you can preserve your alignment. To see how this works, enter some data "Code"d and click on Preview. This will show you how your post will be seen by the forum.

Good luck icon_smile.gif
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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am


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