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

Concatenate 2 fields (usage national) in COBOL


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

New User


Joined: 20 May 2022
Posts: 6
Location: India

PostPosted: Fri May 20, 2022 12:33 pm
Reply with quote

Hello All,

I have a requirement to concatenate two fields from input files to a new field in output. Below are the details,

Input field:
05 IN-NOTES-3 PIC N(40) USAGE IS NATIONAL.
05 IN-NOTES-4 PIC N(40) USAGE IS NATIONAL.

Output field:
05 OUT-NOTES PIC N(80) USAGE NATIONAL.

I tried the below. Is this the right way?

STRING IN-NOTES-3 DELIMITATED BY SIZE
IN-NOTES-4 DELIMITATED BY SIZE
INTO OUT-NOTES
END-STRING
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1204
Location: Dublin, Ireland

PostPosted: Fri May 20, 2022 12:43 pm
Reply with quote

Please use code tags for your examples.

If you tried what you have shown, what results did you get?

DELIMITATED is not a valid keyword, suggest you try DELIMITED and see what happens.

Garry.
Back to top
View user's profile Send private message
Aravinth Kumar

New User


Joined: 20 May 2022
Posts: 6
Location: India

PostPosted: Fri May 20, 2022 1:06 pm
Reply with quote

Oops!!!! that was a typo while I posted here for DELIMITED.

@Gary, i will try this and update here about the results.

STRING IN-NOTES-3 DELIMITED BY SIZE
IN-NOTES-4 DELIMITED BY SIZE
INTO OUT-NOTES
END-STRING
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 COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts Pull data using date difference betwe... DB2 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
Search our Forums:

Back to Top