Difference between W and S?



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Difference between W and S?

Postby TRESA » Sat Nov 03, 2007 12:47 pm

WS-FIRST-LINE S 01 A VALUE 'Y'
WS-FIRST-LINE W 01 A VALUE 'Y'

can anyone point out the difference between these 2 declarations?
TRESA
 
Posts: 8
Joined: Sun Oct 28, 2007 11:51 am
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between W and S?

Postby CICS Guy » Sat Nov 03, 2007 1:24 pm

TRESA wrote:can anyone point out the difference between these 2 declarations?
I'm not really sure either, but here's what the manual says about Working Storage Fields
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between W and S?

Postby BillyBoyo » Sat Jan 29, 2011 5:57 pm

TRESA wrote:WS-FIRST-LINE S 01 A VALUE 'Y'
WS-FIRST-LINE W 01 A VALUE 'Y'

can anyone point out the difference between these 2 declarations?


Both define "working storage fields". When a "W" field is referenced in a report, its value is that which it had at the time of the PRINT statement to produce the report. The value of an "S" field is resolved at the time that the report is formatted for printing. Can cause confusions and differences.

I suggest using a different prefix for the two different types (I cunningly use "W-" and "S-"). I make a rule of thumb, never to amend a "W" field in a report procedure, never to use an "S" field in a report without amending it in a report procedure.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post