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

Can a alphanumeric data be moved to a group variable ?


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

New User


Joined: 02 Apr 2016
Posts: 18
Location: India

PostPosted: Mon Oct 30, 2017 8:28 am
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: 319
Location: Inside the SPEW (Cincinnati OH USA)

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

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

Global Moderator


Joined: 21 Sep 2010
Posts: 2572
Location: NYC,USA

PostPosted: Mon Oct 30, 2017 4:37 pm
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 Member


Joined: 29 Apr 2008
Posts: 932
Location: Maryland

PostPosted: Mon Oct 30, 2017 6:52 pm
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: 18
Location: India

PostPosted: Tue Oct 31, 2017 7:14 am
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: 18
Location: India

PostPosted: Tue Oct 31, 2017 7:16 am
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: 18
Location: India

PostPosted: Tue Oct 31, 2017 7:17 am
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: 8569
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 31, 2017 7:23 am
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: 18
Location: India

PostPosted: Tue Oct 31, 2017 7:48 am
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: 319
Location: Inside the SPEW (Cincinnati OH USA)

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

an old discussion lends some insight

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

Global Moderator


Joined: 10 May 2007
Posts: 2453
Location: Hampshire, UK

PostPosted: Tue Oct 31, 2017 4:37 pm
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Secondary index error while loading d... IMS DB/DC 2
No new posts SKIP LOCKED DATA in UPDATE statement DB2 9
No new posts FILE STATUS - 39 ON VARIABLE LENGTH V... COBOL Programming 2
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
No new posts DB2 group member usage DB2 0
Search our Forums:

Back to Top