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     Mainframe to PC file transfer with both Alpha and packed fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Mainframe to PC file transfer with both Alpha and packed fields
 Login/Join
 
Member
posted
Hi, I have mainframe file with records that have both Alpha and packed fields:

.MAS file to describe this file :
FILE=VISA3 ,SUFFIX=FIX,$
SEGNAME=VISA3 ,SEGTYPE=S0,$
FIELDNAME =ART-LINE ,E01 ,A2 ,A2 ,$
FIELDNAME =POLICY_IND ,E11 ,A1 ,A1 ,$
FIELDNAME =INCCNT ,E12 ,D6 ,P3 ,$
FIELDNAME =CLSCNT ,E13 ,D6 ,P3 ,$
FIELDNAME =OSAMT ,E14 ,D12.2 ,P6.2 ,$
FIELDNAME =PAIDAMT ,E15 ,D12.2 ,P6.2 ,$

Here is the problem: If I FTP file to PC with ASCII - Alpha fields are correct, but not numeric ones,
If I FTP with BINARY - numeric are correct, but alpha are wrong


FILEDEF F3 DISK \\***\***\F3.txt
TABLE FILE F3
PRINT *
WHERE RECORDLIMIT EQ 1
END

After BINARY FTP:
ññ ñ Ã -11 29 4,839.33 23,002.93

What can be done to make it work?


WebFOCUS 7.6 (in migration)
Mainframe FOCUS
Mainframe, Windows, client/server.
Output: PDFs, Excel
 
Posts: 4 | Registered: January 29, 2008Report This Post
Expert
posted Hide Post
HOLD the file as FORMAT ALPHA or SAVE the file before ASCII FTP.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
File is not created by Focus program. We are in the process of convertiong Mainframe Focus to WebFocus on client/server; we will have many files like that and no Focus before FTP( only after we FTP I can do something in WebFocus)


WebFOCUS 7.6 (in migration)
Mainframe FOCUS
Mainframe, Windows, client/server.
Output: PDFs, Excel
 
Posts: 4 | Registered: January 29, 2008Report This Post
Virtuoso
posted Hide Post
Maybe this will help:
1. do a binary ftp. Collect the number fields in a hold file and add a sequence number.
2. do as ascii ftp. Collect the ascii fields in a second hold file and also add the sequence number.
3. match both hold files based on the equence number.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
Hi Lufa, you have mainframe focus, right? So, why not create a mainframe focus program to convert the file to format alpha and then ftp? We did this 2 years ago on all the IMS and DB2 data that migrated to PC.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
Anatess is correct, Lufa. Even if you do a binary ftp, you will always have problems with packed fields bacause of their structure. Ftp will do the ebcdic to ascii conversion one byte at a time and packed fields need to be looked at as a whole entity.

Since you have MF Focus, do what Anatess suggested and convert the packed fields to at least decimal and then do your ftp. You can send the master down as well and use both to reload your sources if they are other than ftm files.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thank to all of you for the reply.
We will not have Mainframe Focus after conversion is complete.

I can try GamP suggestion, if I will be able to make it generic for files with different structure and different mix of Alpha and Numeric fields.


WebFOCUS 7.6 (in migration)
Mainframe FOCUS
Mainframe, Windows, client/server.
Output: PDFs, Excel
 
Posts: 4 | Registered: January 29, 2008Report This Post
Guru
posted Hide Post
Lufa, but you won't need Mainframe Focus after conversion is complete... because by then, all your files would have been ftp'd to PC!


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Member
posted Hide Post
No, Files will continue to be created on mainframe and I can't ask to change files for me, because same files are used somewhere else.


WebFOCUS 7.6 (in migration)
Mainframe FOCUS
Mainframe, Windows, client/server.
Output: PDFs, Excel
 
Posts: 4 | Registered: January 29, 2008Report This Post
Expert
posted Hide Post
Then I think you will have to write a COBOL program or something to unpack the packed fields after the files are created.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Ginny probably has the most correct answer, but one approach I have come across is to do 2 ftp sessions, 1 binary and 1 ASCII.

Then combine the 2 files, taking the packed from the binary transferred and the alpha from the ASCII transferred to create a new file. This could be done in WF without too much hassle.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Alan,

He will still have to write a program to split up the fields and I still think he will have problems with the packed fields even if he sends then down as binary.

I haven't done this is a long time but I do remember that the packed fields were quite the challenge.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Ginny

I must admit that I thought that the packed fields would be a problem. But from his first entry he says he can TABLE out the packed fields from the binary transfer. I came across this idea eons ago but never tried it.

That being so, then there should not be a problem!

But I do agree with you that the responsibility for data conversion should be on the MF.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Lufa,

Do you have something like SELCOPY on mainframe? This could be an alternative to getting a COBOL prog written to convert the file.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     Mainframe to PC file transfer with both Alpha and packed fields

Copyright © 1996-2020 Information Builders