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: 2
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: 1153
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: 2
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 Getting SOC4 while calling a Cobol DB... PL/I & Assembler 4
No new posts COBOL Program to search for five digi... COBOL Programming 4
No new posts Search substring in internal table of... COBOL Programming 2
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
Search our Forums:

Back to Top