Data Conversion - Data from Micro Focus Cobol to Cobol



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Data Conversion - Data from Micro Focus Cobol to Cobol

Postby meetraju2002 » Thu Aug 24, 2017 6:39 am

Hi All,

For the first time in my experice I came across to an incident where I need to use the data coming from Micor Focus cobol created data file and should be utilised by an application supported by normal Cobol.

Is there any simple solution to read the microfocus cobol data in to normal cobol and maintain the data. Please do share some links where I can get more information regarding this topic.

Thanks,
Rajkumar
meetraju2002
 
Posts: 4
Joined: Tue Sep 20, 2016 12:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Data Conversion - Data from Micro Focus Cobol to Cobol

 

Re: Data Conversion - Data from Micro Focus Cobol to Cobol

Postby Robert Sample » Thu Aug 24, 2017 8:12 am

Is there any simple solution to read the microfocus cobol data in to normal cobol and maintain the data
This makes no sense at all -- Microfocus COBOL is normal COBOL, with extensions. There is an international standards group for COBOL and Microfocus, like IBM, verifies that their COBOL compiler implements the standard.

Perhaps you can explain more what you mean since what you posted is complete nonsense?
Robert Sample
Global moderator
 
Posts: 3419
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 235 times

Re: Data Conversion - Data from Micro Focus Cobol to Cobol

Postby meetraju2002 » Thu Aug 24, 2017 8:43 am

Hi,

I am talking the topic interms of Data, remember, In micro focus COBOL the data that may be required to be converted in the following ways

Text Data --> ASCI and Numeric -- > in to Binary, if I am wrong then it could be vice versa.

So before reading the data from micro focus cobol may need to be converted in to the data that can be read easily by COBOL.

If you have not come across these kind of situations then it is my bad to see this kind of reply. I got this kind of scenario and that is the reason I have posted this question.

Thanks,
Rajkumar
meetraju2002
 
Posts: 4
Joined: Tue Sep 20, 2016 12:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Data Conversion - Data from Micro Focus Cobol to Cobol

Postby enrico-sorichetti » Thu Aug 24, 2017 1:44 pm

If you have not come across these kind of situations then it is my bad to see this kind of reply. I got this kind of scenario and that is the reason I have posted this question.


the problem is NOT the situation but the sloppy way You described Your problem :evil:

there is NO microfocus COBOL data nor COBOL data

there is just good old plain data which is normally stored in
some database ( DB2, oracle, ..., ... )
datasets on the mainframe, files in the PC world

so it looks like You have the need to convert a file on a PC (ASCII) into a mainframe dataset (EBCDIC)

on the <sending> side You will have to convert all the data to TEXT, NO BINARY data
and after that at data transfer time FTP will take care of the conversion
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2684
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 135 times

Re: Data Conversion - Data from Micro Focus Cobol to Cobol

Postby Robert Sample » Thu Aug 24, 2017 5:02 pm

If you have not come across these kind of situations then it is my bad to see this kind of reply. I got this kind of scenario and that is the reason I have posted this question.
In my more than 40 years in IT, I have converted data from ASCII to EBCDIC or vice versa hundreds of times. The issue I had is NOT with the data conversion, it is with the poor way you wrote your question. As was pointed out, there is no such thing as "Micro Focus COBOL data" or "mainframe COBOL data" -- there is simply data. When transferring data between an ASCII system and an EBCDIC system (such as a PC / Unix box and a mainframe), data conversion does NOT depend upon the language used to create the file / data set. So when you understand this, you will see why your original post was complete nonsense -- since there is no such thing as "COBOL data", you cannot convert it in any way BECAUSE IT DOES NOT EXIST!

Enrico gave you the answer -- convert each field from COMP (-1, -2, -3, -4, -5 doesn't matter) to DISPLAY and then use FTP or the transfer mechanism of your choice to transmit the file / data set as text and the conversion will be done for you automatically. If you don't want to convert each field individually, you can transfer the data as BINARY but then you have to have a way to handle EBCDIC on a PC / Unix box or ASCII on a mainframe. This can be done but it can get messy, particularly since you STILL have to know how to convert each COMP field individually. Converting each field individually takes some front end work but it (usually) only has to be done once.
Robert Sample
Global moderator
 
Posts: 3419
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 235 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post