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
 

 

Reqd logic in string problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Reqd logic in string problem
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    Post subject:
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    Post subject:
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    Post subject:
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    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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


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