Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Have troubles to generate a Barcode characters chain

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Have troubles to generate a Barcode characters chain
 Login/Join
 
Member
posted
Hi All.

I have a fex report that produce a invoice in PDF format using a Compound Report and part of this report is two fex that generate 2 barcodes 128 image. My problem is that the barcodes are generated by a series of Characters or Symbols such as & %" $@# etc...including single quote ' and comma , and this is my problem because WebFocus interpret these symbols as delimiters and I can not save the complete characters chain into a focus file. I have tried using double quote " but the problem continue. I don't know if is necessary to set a environment variable in order to " function properly. Anyone can help me about how I can use the single quote ' and comma as data? Thanks

This message has been edited. Last edited by: <Kathryn Henning>,


WebFocus 8009, Windows 10, Windows Server 2012
 
Posts: 15 | Location: WebFOCUS 8009 | Registered: March 15, 2014Report This Post
Expert
posted Hide Post
Can you post the code you have ?

Or a comparable sample that will repro the issue


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
quote:
Originally posted by Waz:
Can you post the code you have ?

Or a comparable sample that will repro the issue


Hi Waz, thanks for your help.
This is the code that generate the Barcode Characters Chain in order to print the Barcode Image: I Have additional lines in order to validate the output characters. In this code the main function is capture the Chain of characters that need to be converted by an external program that generate special symbols and characters and will be interpreted by a barcode Font in order to generate the barcode image. The problem with the single quote is when the external program include this single quto ' or a comma , I can not include into a focus file because WEbfocus read this characters as delimiters and not as data.

Let me knw if you need more details.

Thanks

-* File PREBARC1.fex
SET TEMP=C:\IBI\APPS\FORMULA\LUZFEX
SET MSG=OFF
-RUN

USE
C:\IBI\APPS\FORMULA\LUZFOC\IMPR.FOC
C:\IBI\APPS\FORMULA\LUZFOC\BARFILED1.FOC
END

CREATE FILE BARFILED1
-RUN

-SET &CONT = &FACINI ;

-INICIO

-WINNT DEL C:\IBI\APPS\FORMULA\LUZFEX\BARMELC1.TXT
-RUN
-WINNT DEL C:\IBI\APPS\FORMULA\LUZFEX\BCFIRS1.TXT
-RUN
-WINNT DEL C:\IBI\APPS\FORMULA\LUZFEX\BCSECON1.TXT
-RUN

-LECTURA

JOIN CLEAR *
-RUN
-IF &CONT GT &FACFIN GOTO SALIDA ;
FILEDEF BCFIRS1 DISK C:\IBI\APPS\FORMULA\LUZFEX\BCFIRS1.TXT
-RUN

DEFINE FILE IMPR
VARCOB/A37 = EDIT(CADEN3,'9999999999999999999999999999999999999');
END
SET PAGE=NOPAGE
SET PAPER=99999
SET LINES=99999
-RUN
TABLE FILE IMPR
SUM
FST.VARCOB AS VARCOB
BY &VARIABLE NOPRINT
IF &VARIABLE EQ &CONT
ON TABLE HOLD FORMAT ALPHA AS BCFIRS1
END
-RUN

-IF &RECORDS NE 0 GOTO PASO_01 ;

-SET &CONT = &CONT + 1 ;
-GOTO LECTURA

-PASO_01

FILEDEF BCSECON1 DISK C:\IBI\APPS\FORMULA\LUZFEX\BCSECON1.TXT
FILEDEF BARMELC1 DISK C:\IBI\APPS\FORMULA\LUZFEX\BARMELC1.TXT
-RUN

-SET &PART1 = 'C:\IBI\APPS\FORMULA\LUZFEX\';
-RUN
-SET &PART2 = 'BCFIRS1.TXT';
-RUN
-SET &COPIF = &PART1 | &PART2 ;
-RUN

-SET &VIA01 = 'ibi\';
-RUN
-SET &VIA04 = 'Comman~1\';
-RUN

-SET &PATHT = 'C:\' | &VIA01 | &VIA04 ;
-RUN
-SET &PATHE = &PATHT | 'VariableDataFileba1.cmd' ;
-RUN
-SET &COPIA = &COPIF | ' ' | &PATHT ;
-RUN

-WINNT C:\IBI\APPS\FORMULA\LUZFEX\copiabarra1.cmd
-RUN

-PARTE_DAT1
JOIN CLEAR *
-RUN

FILEDEF BCSECON1 DISK C:\IBI\APPS\FORMULA\LUZFEX\BCSECON1.TXT
-RUN

TABLE FILE IMPR
SUM
FST.CADEN3
BY &VARIABLE
IF &VARIABLE EQ &CONT
ON TABLE HOLD FORMAT ALPHA AS BCSECON1
END
-RUN

FILEDEF BCSECON1 DISK C:\IBI\APPS\FORMULA\LUZFEX\BCSECON1.TXT
-RUN
-READ BCSECON1 &VARKEY.A7 &BARTEXT.A37
-RUN
FILEDEF BARMELC1 DISK C:\IBI\APPS\FORMULA\LUZFEX\BARMELC1.TXT
-RUN
-READ BARMELC1, &ENCODBAR
-RUN

-SET &POS01 = EDIT(&ENCODBAR,'9');
-SET &POS02 = EDIT(&ENCODBAR,'$9');
-SET &POS03 = EDIT(&ENCODBAR,'$$9');
-SET &POS04 = EDIT(&ENCODBAR,'$$$9');
-SET &POS05 = EDIT(&ENCODBAR,'$$$$9');
-SET &POS06 = EDIT(&ENCODBAR,'$$$$$9');
-SET &POS07 = EDIT(&ENCODBAR,'$$$$$$9');
-SET &POS08 = EDIT(&ENCODBAR,'$$$$$$$9');
-SET &POS09 = EDIT(&ENCODBAR,'$$$$$$$$9');
-SET &POS10 = EDIT(&ENCODBAR,'$$$$$$$$$9');
-SET &POS11 = EDIT(&ENCODBAR,'$$$$$$$$$$9');
-SET &POS12 = EDIT(&ENCODBAR,'$$$$$$$$$$$9');
-SET &POS13 = EDIT(&ENCODBAR,'$$$$$$$$$$$$9');
-SET &POS14 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$9');
-SET &POS15 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$9');
-SET &POS16 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$9');
-SET &POS17 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$9');
-SET &POS18 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$$9');
-SET &POS19 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$$$9');
-SET &POS20 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$$$$9');
-SET &POS21 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$$$$$9');
-SET &POS22 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$$$$$$9');
-SET &POS23 = EDIT(&ENCODBAR,'$$$$$$$$$$$$$$$$$$$$$$9');

-TYPE &POS01 &POS02 &POS03 &POS04 &POS05 &POS06 &POS07 &POS08 &POS09 &POS10 &POS11 &POS12 &POS13 &POS14 &POS15 &POS16 &POS17 &POS18 &POS19 &POS20 &POS21 &POS22 &POS23

-IF &CONT EQ &FACFIN GOTO SALIDA ;

-SET &CONT = &CONT + 1 ;
-GOTO INICIO
JOIN CLEAR *

DEFINE FILE IMPR
BARTEXT/A38 WITH &VARIABLE = '&BARTEXT' ;
ENCODBAR/A23 WITH &VARIABLE = '&ENCODBAR';
END

TABLE FILE IMPR
SUM
BARTEXT
ENCODBAR
BY &VARIABLE
IF &VARIABLE EQ &CONT
ON TABLE HOLD FORMAT ALPHA AS BARFILE1
END
-RUN

SET COMMIT=OFF
-RUN

MODIFY FILE BARFILED1
FIXFORM CLIENTE/7 VTXTBAR/37 VCODBAR/23
MATCH CLIENTE
ON NOMATCH INCLUDE
ON MATCH CONTINUE
DATA ON BARFILE1
END
-RUN

-IF &CONT EQ &FACFIN GOTO SALIDA ;

-SET &CONT = &CONT + 1 ;
-GOTO INICIO

-SALIDA


WebFocus 8009, Windows 10, Windows Server 2012
 
Posts: 15 | Location: WebFOCUS 8009 | Registered: March 15, 2014Report This Post
Guru
posted Hide Post
WillySa, I just have glimpse over on your 1st post. Pls ignore if below things doesn't help

-SET &PVALUE=IF &FOCMODE EQ 'CMS' OR 'CRJE' OR 'MSO' OR 'TSO' OR 'OS' THEN 157 ELSE 130;
-SET &COMMA=HEXBYT(&PVALUE,'A1');
DEFINE FILE CAR
COMMACHECK/A20='Comma &COMMA '|'is here';
END
TABLE FILE CAR
SUM CAR 
BY COMMACHECK
ON TABLE PCHOLD FORMAT PDF
END  


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Expert
posted Hide Post
So the problem spot is the MODIFY ?

MODIFY FILE BARFILED1
FIXFORM CLIENTE/7 VTXTBAR/37 VCODBAR/23
MATCH CLIENTE
ON NOMATCH INCLUDE
ON MATCH CONTINUE
DATA ON BARFILE1
END
-RUN


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
quote:
Originally posted by Waz:
So the problem spot is the MODIFY ?

MODIFY FILE BARFILED1
FIXFORM CLIENTE/7 VTXTBAR/37 VCODBAR/23
MATCH CLIENTE
ON NOMATCH INCLUDE
ON MATCH CONTINUE
DATA ON BARFILE1
END
-RUN


Yes...at the end, the problem is the MODIFY because I need to include the Characters Chain into a focus file in order to join to the Invoice file and generate the barcode image.

Thanks Waz


WebFocus 8009, Windows 10, Windows Server 2012
 
Posts: 15 | Location: WebFOCUS 8009 | Registered: March 15, 2014Report This Post
Expert
posted Hide Post
This should work, using DATA ON BARFILE1 should allow any char to be added to the FOCUS file.

e.g.
EX -LINES * EDAPUT MASTER,tmp_data,CV,FILE
FILENAME=tmp_data, SUFFIX=FIX,$
SEGNAME=tmp_data, $
  FIELD=FIELD1 ,ALIAS=  ,A1 ,A1 ,$
EDAPUT*


EX -LINES * EDAPUT FOCTEMP,tmp_data,CV,FILE
!@#$%^&*()_+~`,.<>;':"[]{}\|
EDAPUT*

FILEDEF TMP_DATA DISK tmp_data.ftm (LRECL 1 RECFM F


EX -LINES * EDAPUT MASTER,foc_data,CV,FILE
FILENAME=foc_data, SUFFIX=FOC,$
SEGNAME=foc_data, $
  FIELD=FIELD1 ,ALIAS=  ,A50 ,A50 ,$
EDAPUT*

CREATE FILE FOC_DATA

-RUN

MODIFY FILE FOC_DATA

FIXFORM FROM TMP_DATA

DATA ON TMP_DATA
END

TABLE FILE FOC_DATA
PRINT *
END


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Thanks to ALL
Finally using the -WRITE FILEBAR &VAR1 &VAR2 &VAR3, where &VAR3 contains the characters chain and after include the records into MODIFY working good and I found the solution to my problem.

Thanks Againg for you help.

William


WebFocus 8009, Windows 10, Windows Server 2012
 
Posts: 15 | Location: WebFOCUS 8009 | Registered: March 15, 2014Report This Post
Expert
posted Hide Post
Hi William,

Please edit your first post in this thread and add [SOLVED] or [CLOSED] to the title.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Have troubles to generate a Barcode characters chain

Copyright © 1996-2020 Information Builders