Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 18
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: 299
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: 2298
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 Member


Joined: 29 Apr 2008
Posts: 607
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: 18
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: 18
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: 18
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: 8497
Location: Dubuque, Iowa, 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: 18
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: 299
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: 2247
Location: Hampshire, 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 data from n DB2 Views automat... esmeraldo All Other Mainframe Topics 1 Wed Nov 13, 2019 12:32 am
No new posts adrdssu for copy all data robyjhl JCL & VSAM 4 Tue Nov 12, 2019 11:17 pm
No new posts Convert mainframe data to .csv format... karan_reddy DFSORT/ICETOOL 10 Sat Nov 02, 2019 2:09 am
No new posts COBOL -DB2 SQL code to have GROUP BY ... vinu78 DB2 21 Wed Oct 23, 2019 7:00 pm
No new posts How to place name of the file where t... danielgp89 SYNCSORT 18 Thu Oct 17, 2019 12:55 am

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