Focal Point
[solved] Continuing Concatenation fields to next line

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/969102884

July 15, 2010, 06:54 AM
Rajiv Garg
[solved] Continuing Concatenation fields to next line
I work on Mainframes focus language.

In Define statement, i am concatinating certain fields as below

O KEY1/A17 = OI.CD|SA.CD|BIT.CD|ISSUE.ST.CD|FNO|STD.PRV.IND|KEY.ACCT.IND  


I need to add few more fields but there is no space left on this line, so i need to use next line. How can i continue adding concatenating variables in next line. Is there any continuation symbol for these cases?

This message has been edited. Last edited by: Rajiv Garg,


FOCUS version 7.6.7.
Windows
Excel
July 15, 2010, 07:29 AM
Stefaans
Hi

Try
KEY1/A17 = OI.CD|SA.CD|BIT.CD|ISSUE.ST.CD|FNO|STD.PRV.IND|KEY.ACCT.IND;
KEY1 = KEY1 | OI.PPPP | OI.QQQQ;
Remember there is a limit based upon the defined size of your variable.


WebFOCUS 7.7.01 Windows, TSO 7.0
July 15, 2010, 09:32 AM
Alan B
Stefaans - Won't work...

An expression ends with a ';' or an END in a DEFINE


Alan.
WF 7.705/8.007
July 15, 2010, 09:46 AM
fatboyjim
Hi,

Not sure if this works in Mainframe FOCUS, but you can define fields using multiline as follows in WebFOCUS

  
DEFINE FILE EMPDATA
KEY1/A60=''|PIN
	|DIV
	|DEPT
	|TITLE
;
END


See if that helps.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
July 15, 2010, 09:47 AM
mrguru
You have to have a size for the defined field that is big enough to hold all the concatenated fields. In Stefanns example the second KEY1 does not have a size.


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
July 15, 2010, 10:06 AM
Stefaans
quote:
Originally posted by Alan B:
Stefaans - Won't work...

An expression ends with a ';' or an END in a DEFINE


Alan, one assumes that the gentleman knows that you have to have the DEFINE FILE XXXX
my code in between and then the END statement. Unless I have made a typo that I do not know about, the code should work.
s


WebFOCUS 7.7.01 Windows, TSO 7.0
July 15, 2010, 10:09 AM
Stefaans
quote:
Originally posted by mrguru:
You have to have a size for the defined field that is big enough to hold all the concatenated fields. In Stefanns example the second KEY1 does not have a size.

Hi
I would remind you that by adding a size to the second KEY will re-define the field. THIS IS A NO NO.
All that you are doing is concatenating onto the original field. Trust me it works,


WebFOCUS 7.7.01 Windows, TSO 7.0
July 15, 2010, 10:17 AM
Francis Mariani
Sheeeeesh!

This is an easy one.

It is a DEFINE statement, hence FOCUS code, not Dialogue Manager code, hence no continuation character.

DEFINE FILE XXXX
NEW_FIELD/A2000 = 
FIELD1A |
FIELD2A |
FIELD1B |
FIELD2B |
FIELD1C |
FIELD2C |
FIELD1D |
FIELD2D |
FIELD1E |
FIELD2E |
FIELD1F |
FIELD2F |
FIELD1G |
FIELD2G |
FIELD1H |
FIELD2H |
FIELD1I |
FIELD2I |
FIELD1J |
FIELD2J |
FIELD1K |
FIELD2K |
FIELD1L |
FIELD2L |
FIELD1M |
FIELD2M |
FIELD1N |
FIELD2N |
FIELD1O |
FIELD2O |
FIELD1P |
FIELD2P |
FIELD1Q |
FIELD2Q |
FIELD1R |
FIELD2R |
FIELD1S |
FIELD2S |
FIELD1T |
FIELD2T |
FIELD1U |
FIELD2U |
FIELD1V |
FIELD2V |
FIELDZZ;
END



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
July 15, 2010, 10:19 AM
Tony A
Stefaans,

I guess what mrguru is implying is that the second KEY1 without a format will be trying to fit KEY1(A17) + OI.PPPP(A?) + OI.QQQQ(A?) into a format of A17. Even if the two additional fields were A1 then the total size being fitted into the second KEY1 would be A19 and an error should be encountered.

Jimmy's should work OK across several lines on mainframe.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
July 15, 2010, 10:24 AM
Stefaans
Francis, you are totally correct on this one, but I think that Rajiv's question was related to the fact that he is dealing with a FOCEXEC that is either on and MVS or VM box where FOCEXEC's can only have a logical record length of 80 chars. If I understand him correctly he wanted to know how he could do this with via a continuation method. Just my thoughts. Perhaps I am wrong. Regards Steve Simon


WebFOCUS 7.7.01 Windows, TSO 7.0
July 15, 2010, 10:34 AM
Dave
Well, Francis' solution works...

What also works.. ( less lines, and still readable Wink )
KEY_PART1/A100 = AA | BB | CC | DD | EE | FF;
KEY_PART2/A100 = GG | HH | II | JJ | KK | LL;
KEY_PART3/A100 = MM | NN | OO | PP | QQ | RR;
KEY/A300 = KEYPART1 | KEYPART2 | KEYPART3;


G'luck


_____________________
WF: 8.0.0.9 > going 8.2.0.5
July 15, 2010, 10:53 AM
Francis Mariani
Stefaans, I understood what Rajiv's question was related to. You don't need a continuation character and you never have a problem with FOCUS or WebFOCUS code where there is a limitation of 80 character lines. The only time there might be a problem is when a field name is longer than 80 characters, even then, you can just type 80 characters and FOCUS will figure out the complete field name, unless there are two or more field names where the first 80 characters are the same!

This is a complete non-issue.

Regards.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
July 15, 2010, 05:40 PM
Waz
Such a simple question, and such a very long answer.




Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 16, 2010, 06:41 AM
Rajiv Garg
I would like to thank eveyone for the suggesstions. Its the most active forum.

For me, Francis solution works.


FOCUS version 7.6.7.
Windows
Excel