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

Reqd logic in string problem


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

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Thu Feb 09, 2006 2:34 pm
Reply with quote

FD filein
01 PPIDEL-REC. (Input file record structure)
03 D-A PIC X(9). value ab/s
03 D-B PIC X(9). value dcab/s
03 D-C PIC X(5). value dffab
03 D-E PIC X(3). value abs
03 D-F PIC X(3). value fbs
03 D-G PIC X(7). value 6455556
03 D-H PIC XX. value 34
03 D-I PIC X(40). value ab/gdfjgfs

FD fileout (O/P file)
01 Out-REC.
03 cout PIC X(132).

I have to transfer data from I/P file to O/P file but in CSV format (comma seperated file) ex shown below :-


Final output in fileout should be

ab/s,dcab/s,dffab,abs,fbs,6455556,34,ab/gdfjgfs

Mind that no space should come between ab/s and ','

Pls assist
Back to top
View user's profile Send private message
jangam

New User


Joined: 02 Feb 2006
Posts: 7

PostPosted: Thu Feb 09, 2006 3:04 pm
Reply with quote

hi

CODE:

STRING D-A DELIMITED BY SPACES
"," DELIMITED BY SIZE
D-B -DO- SPACES
"," -DO - SIZE
----------------------
------------
------------------------
D-I DELIMITED BY SPACES
"," DELIMITED BY SIZE
INTO COUT
END-STRING.

go through the code i think this will solve your problem
if any questions plz ask me

bye

jangam
Back to top
View user's profile Send private message
jangam

New User


Joined: 02 Feb 2006
Posts: 7

PostPosted: Thu Feb 09, 2006 3:15 pm
Reply with quote

hi
Code:

STRING D-A  DELIMITED BY SPACES
             ","   DELIMITED BY SIZE
             D-B DELIMITED BY SPACES
             ","   DELIMITED BY  SIZE
              ----------------------
              ------------
              ------------------------
              D-I DELIMITED BY SPACES
               "," DELIMITED BY SIZE
      INTO COUT
END-STRING.


FOR BETTER UNDERSTAND
ANY CORRECTIONS WELCOME

BYE
JANGAM
Back to top
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Thu Feb 09, 2006 3:19 pm
Reply with quote

Thanks Jangam
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top