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: 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: 282
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: 2038
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: 379
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: 8406
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: 282
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: 2110
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
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts REFORMATTING WITH JFY CLOBBERING OUTP... speermb DFSORT/ICETOOL 12 Thu Nov 08, 2018 7:20 pm
No new posts Migrating AS400 to HIVE; Data type ma... sindhu.jose All Other Mainframe Topics 1 Tue Nov 06, 2018 1:06 pm
No new posts Confusion regarding length of SQLCA v... Vivek0410 DB2 4 Thu Oct 18, 2018 2:20 pm
No new posts Merge data from record pairs ashokakash DFSORT/ICETOOL 5 Wed Oct 17, 2018 11:38 am

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