HP3000-L Archives

September 2015, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Francois Desrochers <[log in to unmask]>
Reply To:
Francois Desrochers <[log in to unmask]>
Date:
Thu, 3 Sep 2015 18:38:19 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (103 lines)
Ernie,



How about putting the whole thing inside single-quotes?



VALUE '"item one", "item two","","","item three"'.



This works fine if the value is static. If <item one>, etc. are variables, you should look into using the STRING statement.



STRING '"' DELIMITED BY SIZE

       ITEM-ONE DELIMITED BY SIZE

      '","' DELIMITED BY SIZE

      ITEM-TWO DELIMITED BY SIZE

       '","","","' DELIMITED BY SIZE

       ITEM-THREE DELIMITED BY SIZE

       '"'

INTO TARGET-VAR.



There is more to it than this but should get you started.



HTH

François



-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of Newton, Ernie
Sent: September-03-15 1:47 PM
To: [log in to unmask]
Subject: [HP3000-L] Fun with COBOL



Greetings,



It's been a long time since I wrote COBOL, and I have an elementary question about creating a comma-delimited file.



If I want...



"item one", "item two","","","item three"



How do I create the "," between item one and item two?  Is it simply PIC "","" (quote comma quote inside double quotes?)



And the ","",""," would it be the same?  Just put that inside double quotes?



Something tells me that there is an escape sequence, but the mind is not cooperating.



Thanks,



Ernie



________________________________



This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message.



* To join/leave the list, search archives, change list settings, *

* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2