Here my example I was referring to initially..
 
Execution JCL:
 
//REXXC   JOB SYSTEMS,CLASS=A,MSGCLASS=X,
//      MSGLEVEL=(1,1),REGION=4096K,NOTIFY=&SYSUID
//STEP1   EXEC  PGM=TESTR1,PARM=('USER AA1122BB')
//STEPLIB  DD DISP=SHR,DSN=SFORD.LINKLIB
//SYSEXEC  DD DISP=SHR,DSN=IDF.CLISTLIB
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN  DD DUMMY
/*
-----------------------------
C Program 
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct IRXJCL_type
{
  short int arg_length;
  char argument[22];
} IRXJCL_type;
IRXJCL_type this_param;
IRXJCL_type* param_ptr;
main(int argc, char *argv[])
  {
    char dest[22];
    int i = 1;
    int s1;
    memset(this_param.argument,'',sizeof(this_param.argument));
    strcpy(dest,"IDFRACFC ");
    strcat(dest,argv[1]);
    strcat(dest," ");
    strcat(dest,argv[2]);
    strcat(dest," ");
    strcpy(this_param.argument,dest);
    puts(this_param.argument);
}
Output of Execution:
                       J E S 2  J O B  L O G  --  S Y S T E M  A D C D  --  N O
 
08.13.47 JOB00170 ---- WEDNESDAY, 05 SEP 2012 ----
08.13.47 JOB00170  IRR010I  USERID SFORD    IS ASSIGNED TO THIS JOB.
08.13.47 JOB00170  ICH70001I SFORD    LAST ACCESS AT 08:09:12 ON WEDNESDAY, SEPT
08.13.47 JOB00170  $HASP373 REXXC    STARTED - INIT 1    - CLASS A - SYS ADCD
08.13.47 JOB00170  IEF403I REXXC - STARTED - TIME=08.13.47
08.13.48 JOB00170  IEF404I REXXC - ENDED - TIME=08.13.48
08.13.48 JOB00170  $HASP395 REXXC    ENDED
------ JES2 JOB STATISTICS ------
  05 SEP 2012 JOB EXECUTION DATE
           10 CARDS READ
           51 SYSOUT PRINT RECORDS
            0 SYSOUT PUNCH RECORDS
            3 SYSOUT SPOOL KBYTES
         0.01 MINUTES EXECUTION TIME
         //      MSGLEVEL=(1,1),REGION=4096K,NOTIFY=&SYSUID
          IEFC653I SUBSTITUTION JCL - SYSTEMS,CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
        2 //STEP1   EXEC  PGM=TESTR1,PARM=('USER AA1122BB')
        3 //STEPLIB  DD DISP=SHR,DSN=SFORD.LINKLIB
        4 //SYSEXEC  DD DISP=SHR,DSN=IDF.PROD.ORA9421.CLISTLIB
        5 //SYSTSPRT DD SYSOUT=*
        6 //SYSPRINT DD SYSOUT=*
        7 //SYSUDUMP DD SYSOUT=*
        8 //SYSTSIN  DD DUMMY
          /*
ICH70001I SFORD    LAST ACCESS AT 08:09:12 ON WEDNESDAY, SEPTEMBER 5, 2012
IEF236I ALLOC. FOR REXXC STEP1
IEF237I 0A82 ALLOCATED TO STEPLIB
IEF237I 0AA1 ALLOCATED TO SYSEXEC
IEF237I JES2 ALLOCATED TO SYSTSPRT
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO SYSUDUMP
IEF237I DMY  ALLOCATED TO SYSTSIN
IEF142I REXXC STEP1 - STEP WAS EXECUTED - COND CODE 0000
IEF285I   SFORD.LINKLIB                                KEPT
IEF285I   VOL SER NOS= ZCSYS1.
IEF285I   IDF.PROD.ORA9421.CLISTLIB                    KEPT
IEF285I   VOL SER NOS= IDF001.
IEF285I   SFORD.REXXC.JOB00170.D0000101.?              SYSOUT
IEF285I   SFORD.REXXC.JOB00170.D0000102.?              SYSOUT
IEF285I   SFORD.REXXC.JOB00170.D0000103.?              SYSOUT
IEF373I STEP/STEP1   /START 2012249.0813
IEF032I STEP/STEP1   /STOP  2012249.0813
        CPU:     0 HR  00 MIN  00.26 SEC    SRB:     0 HR  00 MIN  00.00 SEC
        VIRT:    60K  SYS:   476K  EXT:     8264K  SYS:    11340K
IEF375I  JOB/REXXC   /START 2012249.0813
IEF033I  JOB/REXXC   /STOP  2012249.0813
        CPU:     0 HR  00 MIN  00.26 SEC    SRB:     0 HR  00 MIN  00.00 SEC
  
IDFRACFC USER AA1122BB
 
Without the memset in this example the C code fails. I am not the C heavy a lot 
of folks are here,
but the ILC manual pretty much shows the same thing in examples going from C -> 
Cobol -> C ..
 
 

Scott J Ford
Software Engineer
http://www.identityforge.com/
 
 

________________________________
 From: "McKown, John" <john.mck...@healthmarkets.com>
To: IBM-MAIN@LISTSERV.UA.EDU 
Sent: Wednesday, September 5, 2012 8:34 AM
Subject: Re: The IBM zEnterprise EC12 announcment
  
What about

char *s6="wombat";

?

This makes s6 a pointer to the characters {'w','o','m','b','a','t','\0'}. There 
is not really any difference between char s6[] and char *s6. You can still do 
s6[0] which is the same as *s6. And s6[1] which is *(s6+1). s6[n] is just an 
alternate way to say *(s6+n). Which is identical to *(n+s6). Which is identical 
to n[s6]. As weird as that may be. I am not sure what C++ would do with that.

-- 
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets®

9151 Boulevard 26 • N. Richland Hills • TX 76010
(817) 255-3225 phone •
john.mck...@healthmarkets.com • http://www.healthmarkets.com/

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets® is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. –The Chesapeake Life Insurance 
Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA 
Life and Health Insurance Company.SM

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of Paul Gilmartin
> Sent: Tuesday, September 04, 2012 6:51 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: The IBM zEnterprise EC12 announcment
> 
> On Tue, 4 Sep 2012 15:01:37 -0400, Thomas David Rivers wrote:
> >
> >   cxx: t.c line 3:Error #144: a value of type "const char [7]" cannot
> >be used to initialize an entity of type "char [6]"
> >     char s6[ 6 ] = "wombat";
> >
> Is there any convenient way to perform this initialization?  (I don't
> consider either overallocating the array or enumerating individual
> chars in a multiple initializer convenient.)
> 
> Thanks,
> gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to