View previous topic :: View next topic
|
Author |
Message |
bhartiG
New User
Joined: 26 Jun 2009 Posts: 2 Location: delhi
|
|
|
|
Hi,
I have to read records with pic 9(4) from a PS file and move the same in an array until end of file.
the structure of array is :
10 ws-array occurs 50 times
05 ws-Id pic 9(4)
please tell me how to do this. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Geetu,
The process is pretty straight forward and u would get the details from any COBOL manuals.
If you are new to COBOL, plz look into PERFORM statments. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Is this a class exercise? |
|
Back to top |
|
|
bhartiG
New User
Joined: 26 Jun 2009 Posts: 2 Location: delhi
|
|
|
|
Hi Binop
Thnx for ur help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
One of the more lacking in continuity topics in quite a while. . .
TS doesn't answer direct question asked, but offers appreciation for an answer that still has me puzzled. . .
How does PERFORM relate/equate to reading a file until eof and getting (some of?) the data from the file into an array? What a giant leap. . .
I guess all that really matters is that at some level communication happened and Geetu is/was able to proceed with the homework. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Surrealistic forum, now? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
And Expat said that psychic day was canceled this week. . . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Does that mean we have two next week to make up? |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi guys,
I was suggesting the PERFORM statment so that Geethu could READ 50 times from the file and MOVE into the arrary. I was guessing Geethu was having problem with the array.
Plz correct me if i am wrong... I am also working my way into the forum... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I suspect that both Robert and i both quite understood what you meant by the earlier reply (because we both - as well as most others who read this - understood the requirement and how to meet it).
What is still a mystery to me is how a complete beginner was to take sufficient meaning from the mere mention of PERFORM. Some kind of perform loop could handle reading the file (which should not be a loop of 50) but has nothing to do with initializing and loading an array (yup, as the items are numeric, they should be initialized to some valid numeric value).
One of the things we try to do for the inexperienced is help them learn how to properly ask a question. Many of the questions posted here (though they should be posted in our "student & fresher" forum instead) are homework assignments rather than business requirements. Hopefully, no business would assign such a task and would not hire someone who did not already know how to do this. The student forum is www.ibmmainframeforum.com |
|
Back to top |
|
|
|