IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Hexadecimal delimited file creation.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Thu Aug 16, 2012 11:17 pm
Reply with quote

Hi there,
I got one requirment to create Hexadecimal delimited file via Cobol.
Could you plz advise how that could be done?
Shall I use Comp-1 or Comp-2? Please advise

Thanks!
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Aug 16, 2012 11:21 pm
Reply with quote

What is a "hexadecimal delimited file"? The term seems to have nothing to do with floating-point numbers, which are what COBOL variables with USAGE of COMP-1 and COMP-2 are.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 16, 2012 11:21 pm
Reply with quote

it would help if you would show examples,
with hex on.

05 CRLF PIC X(02) VALUE X'0D0A'.

in the event that you want to put a carriage-return/line-feed
at the end of each record,
MOVE CRLF TO <end-of-record>
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Thu Aug 16, 2012 11:39 pm
Reply with quote

dbzTHEdinosauer wrote:
it would help if you would show examples,
with hex on.

05 CRLF PIC X(02) VALUE X'0D0A'.

in the event that you want to put a carriage-return/line-feed
at the end of each record,
MOVE CRLF TO <end-of-record>


I created one file by using SAS coding(attached is the Snippet of the file).
Over here dots in b/w two fields iare hexadecimal delimiters.
I created that by moving '09'X in one byte delimiter field.

Now I want to create this file via Cobol. Please advise on this.


Attachments deleted, nothing that could not be shown with a text cut/paste and code tags
Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 16, 2012 11:58 pm
Reply with quote

i have no desire to download your stuff.

your original question was how to create a hexadecimal-ly delimited file
(we knew we were working with a technical neophyte with that comment)
and all i asked was what is the hexadecimal with which you wanted to 'delimit' the records.

we know that you are disadvantaged by knowing so little about mainframe
(possibly computers in general)
but with what do you want to delimit your records?

also, why?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Aug 17, 2012 12:00 am
Reply with quote

ppandey07, you should know better than to post attachments. Browse or edit the data set, set HEX ON, and copy-and-paste using Code tags to preserve alignment.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Aug 17, 2012 12:12 am
Reply with quote

Hello,

One way to do what you want in COBOL use STRING and place a x'09' between each data field.

Another is to define the output file layout with a 1-byte field between each data field and place the x'09' values in these fields.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top