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
 

 

Hexadecimal delimited file creation.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Hexadecimal delimited file creation.
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: 1771
Location: Bloomington, IL

PostPosted: Thu Aug 16, 2012 11:21 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Aug 16, 2012 11:21 pm    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Aug 16, 2012 11:58 pm    Post subject:
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: 1771
Location: Bloomington, IL

PostPosted: Fri Aug 17, 2012 12:00 am    Post subject:
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

Site Director


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

PostPosted: Fri Aug 17, 2012 12:12 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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