-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Rich Specht
Sent: Tuesday, September 20, 2005 1:41 PM
To: [email protected]
Subject: Non-LE ASM calling C function - PList and runtime reuse
questions

<----------------- SNIP------------------------->

When I define using "main", I don't seem to get a standard OS parameter
list.  I've looked at #pragma linkage and PLIST(OS) but can't seem to
get
the right setup.

<---------------- SNIP ------------------------>

See if this does what you want [Note-The brackets around argv may not
format properly on here...]

------------- Program ----------------
#include <stdio.h>                                         
                                                           
int main (int argc, char *argv[])                          
{                                                          
    int i;                                                 
                                                           
    printf("There are %d parms being passed\n",argc);      
                                                           
    for (i = 0; i < argc; i++)                             
    {                                                      
        printf("Argument %d = \'%s\'\n",i,argv[i]);        
    }                                                      
}
------------- JCL to run --------------
//xxxxxx JOB (),'',MSGCLASS=U,
//             CLASS=0,NOTIFY=&SYSUID                 
/*JOBPARM SYSAFF=*                                    
//JS010   EXEC PGM=BGBPTEST,PARM='ONE TWO'            
//STEPLIB   DD DSN=YOURHLQ.PDS.LOAD,DISP=SHR          
//STDOUT    DD SYSOUT=*                               
//STDERR    DD SYSOUT=*

------------ My results --------------
There are 3 parms being passed      
Argument 0 = 'BGBPTEST'             
Argument 1 = 'ONE'                  
Argument 2 = 'TWO'                  

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to