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
 
Can a alphanumeric data be moved to a group variable ?

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
nico_neoz

New User


Joined: 02 Apr 2016
Posts: 10
Location: India

PostPosted: Mon Oct 30, 2017 8:28 am    Post subject: Can a alphanumeric data be moved to a group variable ?
Reply with quote

The group variable that I am referring to here has a sub field level in the form of an array of numeric type variable, similar to the one below

Code:

03 WS-A.
     05  WS-N PIC  OCCURS 20 TIMES 9(01).
03 WS-B PIC X(20) VALUE 'ABC123456'.


Now let's say we move the data from WS-B to WS-A, what will be the data in WS-A
Back to top
View user's profile Send private message

dneufarth

Active User


Joined: 27 Apr 2005
Posts: 255
Location: Cincinnati OH USA

PostPosted: Mon Oct 30, 2017 4:35 pm    Post subject:
Reply with quote

What resulted when you attempted to do it?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Mon Oct 30, 2017 4:37 pm    Post subject:
Reply with quote

Beginners forum question.
Please do some research and try by yourself.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Mon Oct 30, 2017 6:52 pm    Post subject:
Reply with quote

Rohit Umarjikar wrote:
Beginners forum question.
Please do some research and try by yourself.

In average, about 90% of new questions are received from those "experts" mostly trained in computer games... icon_pray.gif
I would call them 'the iksperds" icon_axe.gif
Back to top
View user's profile Send private message
nico_neoz

New User


Joined: 02 Apr 2016
Posts: 10
Location: India

PostPosted: Tue Oct 31, 2017 7:14 am    Post subject:
Reply with quote

dneufarth wrote:
What resulted when you attempted to do it?

The data was passed as such, no abends.
Back to top
View user's profile Send private message
nico_neoz

New User


Joined: 02 Apr 2016
Posts: 10
Location: India

PostPosted: Tue Oct 31, 2017 7:16 am    Post subject:
Reply with quote

Rohit Umarjikar wrote:
Beginners forum question.
Please do some research and try by yourself.


I did, but the result was not as I expected it to be.
Back to top
View user's profile Send private message
nico_neoz

New User


Joined: 02 Apr 2016
Posts: 10
Location: India

PostPosted: Tue Oct 31, 2017 7:17 am    Post subject:
Reply with quote

sergeyken wrote:
Rohit Umarjikar wrote:
Beginners forum question.
Please do some research and try by yourself.

In average, about 90% of new questions are received from those "experts" mostly trained in computer games... icon_pray.gif
I would call them 'the iksperds" icon_axe.gif


Not getting you. icon_question.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Tue Oct 31, 2017 7:23 am    Post subject:
Reply with quote

Quote:
I did, but the result was not as I expected it to be.
So what result did you get and what result did you expect?

The Enterprise COBOL Language Reference manual tells you all about how COBOL works -- including which MOVE statements are allowed and which are not. You should bookmark it so you can reference it frequently for questions like what you posted.
Back to top
View user's profile Send private message
nico_neoz

New User


Joined: 02 Apr 2016
Posts: 10
Location: India

PostPosted: Tue Oct 31, 2017 7:48 am    Post subject:
Reply with quote

Robert Sample wrote:
Quote:
I did, but the result was not as I expected it to be.
So what result did you get and what result did you expect?

The Enterprise COBOL Language Reference manual tells you all about how COBOL works -- including which MOVE statements are allowed and which are not. You should bookmark it so you can reference it frequently for questions like what you posted.


I expected an abend to occur as we are trying to move alphanumeric values to a numeric array, instead the data was moved as such.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 255
Location: Cincinnati OH USA

PostPosted: Tue Oct 31, 2017 11:28 am    Post subject:
Reply with quote

an old discussion lends some insight

http://ibmmainframes.com/about6130.html
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1922
Location: UK

PostPosted: Tue Oct 31, 2017 4:37 pm    Post subject:
Reply with quote

Topic closed as:
OP did not do his research (search the forum)
OP did not refer to the manual
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm

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