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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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