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: 1193
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top