View previous topic :: View next topic
|
Author |
Message |
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|