IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change the value of 88 Level condition variable dynamically.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pratap Kapse

New User


Joined: 14 Sep 2012
Posts: 9
Location: India

PostPosted: Fri Oct 05, 2012 1:00 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Oct 05, 2012 1:21 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Oct 05, 2012 2:22 pm
Reply with quote

Quote:

05 WS-STATUS PIC X(02) VALUE SAPCES


What are SAPCES?
Back to top
View user's profile Send private message
Pratap Kapse

New User


Joined: 14 Sep 2012
Posts: 9
Location: India

PostPosted: Fri Oct 05, 2012 3:07 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Oct 05, 2012 3:08 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 05, 2012 5:16 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 05, 2012 5:25 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts How to load to DB2 with column level ... DB2 6
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
Search our Forums:

Back to Top