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
 
Error: Illegal data in numeric field When passing data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Bindunat

New User


Joined: 10 Jun 2005
Posts: 5

PostPosted: Mon Jun 13, 2005 7:29 pm    Post subject: Error: Illegal data in numeric field When passing data
Reply with quote

I've to pass a numeric data of size 3 to cobol program from jcl. In the jcl, the coding is
//step01 exec pgm=cblex,parm=100

In the cobol I declared the parm in linkage section as
pic 9(03) type.

But when the value is passed from jcl to cobol, the declared variable in linkage section shows an illegal data in numeric field.Can anyone help me with this.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Jun 13, 2005 7:49 pm    Post subject: Re: parm passing
Reply with quote

I'm not a COBOL programmer, but the basic process worked OK for me:
Code:


LINKAGE SECTION.                                                 
01  PARM.                                                       
    03  PARM-LENGTH            PIC S9(04) COMP SYNC.             
    03  THE-PARM.                                               
        05  PARM-1             PIC 9(03).                       
                                                                 
PROCEDURE DIVISION USING PARM.                                   
    DISPLAY THE-PARM.                                           
    MOVE ZEROS TO RETURN-CODE.                                   
    STOP RUN.                                                   
                                                                 

Code:

//STEP0001 EXEC PGM=PROG40,PARM=100                     
//STEPLIB  DD   DISP=SHR,DSN=&SYSUID..COBOL.LOAD         
//SYSOUT   DD   SYSOUT=*                               

Code:

...|....10...+....20...+....30...+....40..
100                                       
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Mon Jun 13, 2005 7:49 pm    Post subject:
Reply with quote

The declaration of the parm must be as follows:
Code:

LINKAGE SECTION.
01  LK-PARM.                             
    02   LK-PARM-LENGTH     PIC 9(3).
    02   LK-PARM-DATI       PIC XXX.       
PROCEDURE DIVISION USING LK-PARM.         

Correct me if I'm wrong.
Back to top
View user's profile Send private message
Girishm

New User


Joined: 09 Mar 2005
Posts: 35
Location: Mysore

PostPosted: Thu Jun 16, 2005 2:35 pm    Post subject:
Reply with quote

Hi bindu,

Definately U missed out the parm-length field in the linkage section.
declare your linkage section as shown by superk and see your output how it looks.

___________
GM
Back to top
View user's profile Send private message
Bindunat

New User


Joined: 10 Jun 2005
Posts: 5

PostPosted: Thu Jun 16, 2005 2:54 pm    Post subject: Re: Error: Illegal data in numeric field When passing data
Reply with quote

Thanks for the help guys
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM 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 for change in combinat... Trinadh DFSORT/ICETOOL 5 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

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