Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1784
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: 6970
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: 6970
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: 1784
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
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us