View previous topic :: View next topic
|
Author |
Message |
Pratap Kapse
New User
Joined: 14 Sep 2012 Posts: 9 Location: India
|
|
|
|
Hi,
I am working on a requirement where the module is fetching 400 rows in below varaible:
Code: |
01 WS-ARRAY
O2 WS-STATUS-ARRAY OCCURS 400 TIMES INDEXED BY WS-INDEX
05 WS-STATUS PIC X(02) VALUE SAPCES. |
And there is a input file with below structure:
Code: |
01 FS-FILE1.
05 FS-NAME PIC X(30).
05 FILLER PIC X(50).
05 FS-STATUS PIC X(02). |
So I want to know that - Is it possible to link WS-STATUS to FS-STATUS?
i.e.
Is there any way to code it like below:
Code: |
01 FS-FILE1.
05 FS-NAME PIC X(30).
05 FILLER PIC X(50).
05 FS-STATUS PIC X(02).
88 FS-ACTIVE-STATUS VALUE IS <All 400 values from WS-STATUS> |
Thanks |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If I've understood the explanation, no.
Perhaps your best bet would be SEARCH ALL on the (up to) 400. Prior to doing the SEARCH ALL, check that the key is different from the previous - if the same, no need for the SEARCH ALL, just use the previous data. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
05 WS-STATUS PIC X(02) VALUE SAPCES
|
What are SAPCES? |
|
Back to top |
|
|
Pratap Kapse
New User
Joined: 14 Sep 2012 Posts: 9 Location: India
|
|
|
|
Bill,
Yes it looks like that is the only solution. And thank you for suggestion about previous record.
Peter,
Sorry, that was a typo. Please read it as SPACES. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
PeterHolland wrote: |
Quote: |
05 WS-STATUS PIC X(02) VALUE SAPCES
|
What are SAPCES? |
A sapce has the hex value 4O in EBCDIC. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
A sapce has the hex value 4O in EBCDIC. |
/friday afternoon on
I always thought that
A sapce was the hex value 4O in ECBDIC.
/friday afternoon off |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Pratap Kapse, the values in the 88 level are established when you compile the program. The input values from the file cannot be known until you execute the program. Hence there is no way that you could recompile the program while it is executing to pick up the values form the input file, and this is what you are wanting to do. |
|
Back to top |
|
|
|