Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Creating TAB delimited output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Wed Jan 23, 2008 6:35 pm    Post subject: Creating TAB delimited output file
Reply with quote

Hi all,

Is is possible to create a tab delimited output file in Cobol ?

How willl we declare the same ?


Regards,
Arien
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jan 23, 2008 7:01 pm    Post subject:
Reply with quote

Yes. It would most likely be a variable length file. COBOL knows nothing about tab delimited, you have to fill in the data and the tab delimiters.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Jan 23, 2008 7:03 pm    Post subject: Reply to: Creating TAB delimited output file
Reply with quote

I create tab delimited datasets regularly in REXX and SAS. I'm sure you can do the same using COBOL. I will assume the dataset will be FTP'ed down to your PC and imported into EXCEL.

When you define your output fields, place a X'05' (HEX 05) in between each field. This will allow EXCEL to place each field in it's own cell when you import the file.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1235
Location: Israel

PostPosted: Wed Jan 23, 2008 8:34 pm    Post subject:
Reply with quote

don't forget, in COBOL you can write:
Code:
    01 TAB-CHAR       PIC  X   VALUE X'05'.
Back to top
View user's profile Send private message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Wed Jan 23, 2008 10:14 pm    Post subject:
Reply with quote

Many thanks guys.. I'll try this declaration ..
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 23, 2008 11:48 pm    Post subject:
Reply with quote

Hello,

One way i use is:

Code:
  MOVE SPACES TO ICE-OUT-1D-REC.
  STRING ICN               X'05'   
         RCD-TYPE          X'05'   
         CLM-TYPE-ALPHA    X'05'   
         DTL-NBR           X'05'   
         DTL-FDOS          X'05'   
         DTL-TDOS          X'05'   
       .
       .
         DTL-NON-COV-DAYS  X'05'                       
         DTL-NON-COV-CHG   X'05'                       
         HDR-TYPE-BILL     X'05' DELIMITED BY '\'     
    INTO ICE-OUT-1D-REC.                                 
  WRITE ICE-OUT-1D-REC.                                   


Also, when downloading to unix or some win-based application (i.e. EXCEL) all of the numeric fields should be coverted to edited "text" before they are put into the download file.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us