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

Input is 3421 & out put as 3 , 4 , 2 , 1


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

New User


Joined: 21 Jun 2006
Posts: 1

PostPosted: Mon Sep 18, 2006 2:56 pm
Reply with quote

i have been asked a question " that is i have a number that is 3421 or any four digit number i want my out put as 3 , 4 , 2 , 1 separetly but you should not implement any logic in procedure division not even refrence modification " i hope its clear check out and hel;p every one out here icon_arrow.gif
Back to top
View user's profile Send private message
Aji

New User


Joined: 03 Feb 2006
Posts: 53
Location: Mumbai

PostPosted: Mon Sep 18, 2006 3:33 pm
Reply with quote

Hi
Have a look at the following code.
working-storage section.
01 a pic 9(04) value 1234.
01 b pic 9,9,9,9.

procedure division.
p1.
move a to b.
display b.
stop run.


Aji Cherian
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts force tablespace using LISTDEF input DB2 1
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
Search our Forums:

Back to Top