Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Removing the period or dot from the v... gopinak COBOL Programming 6 Wed May 09, 2018 1:53 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us