I created my own SW, name CIO,  which is something between JAVA and
ASSEMBLER.
Some command is BCT, B, BP, BZ and many more...Of course no need to use
registers.
Example:
CKDT=FUNC(RC15)
 BEGIN()
 COMP(REC,MYKEY,4)
 BNE(CKDTERR1)
 COMP(RC15,RECL)
 BNE(CKDTERR2)
 RETURN(7)
....
CKDTERR1=ADDRESS()
...

I support VSAM BPAM QSAM and dynamic allocation and many more...


I attach 3 examples of code. One simple and the second one with thread and
TCP server and client and the last with peeking the CVT and display some
memory details.

This can seem a little complicate but it simple. I can take simple code in
JAVA or C# and translate it to CIO.
So, you can write JAVA simple code in Linux and I will translate it to CIO.


Here is a simple example:
//SCRDD DD *
MAIN=FUNC()
BEGIN()
RET=NULL()
RETSTR=NULL()
PRTS('MAIN CALL RND')
RET=CALLF(RND,1,100)
RETSTR=CALLF(F2,'STR1','+STR2')
PRTS(RETSTR)
RETSTR=CALLF(F2,RETSTR,'+STR3')
PRTS(RETSTR)
CHKGET=NULL()
CHKGET=GETSTR(RETSTR)
PRTS(CHKGET)
SETSTR(CHKGET,'TRY-SETSTR')
PRTS(CHKGET)
PRTS('MAIN RETURN RND')
*PRTS('HERE2')
*PRTS('HERE3')
  EXIT(RET)
END()
*
RND=FUNC(MIN,MAX)
 BEGIN()
 LOOP#=INT(4)
 PRTS('IN RND')
  A#RND=INT(0)
* A#RND=INT(0)
  D#RND=PADSTR(8,'#RND')
  A#RND=LOAD(D#RND)
  PRT(A#RND)
  RNDDT=INT(0)
  V1T=INT(-1)
 TRND=ADDRESS()
  RNDDT=CALL(A#RND,MIN,MAX)
  PRTI(RNDDT)
  PTRV1T=INT(0)
  PTRV1T=POINTER(V1T)
  PRT(PTRV1T)
  SETINT(V1T,-1)
  PRTS('CALLF 2 F1 FROM RND 2 PRMS')
  V1T=CALLF(F1,'PRM12FUNC ','HIPRM2')
  PRTS('RND RETURN F1')
  PRTI(V1T)
  BCT(LOOP#,TRND)
  DEL(D#RND)
  RETURN(RNDDT)
 END()
*
F1=FUNC(STR1,STR2)
 BEGIN()
  V2T=INT(-1)
  PRTS('CALLF 2 F2 FROM F1  2 PRMS')
* A=NULL()
* A=STRCAT(STR1,STR2)
* PRTS(A)
 PRTS(STR1)
 PRTS(STR2)
 RETURN(1)
 END()
*
F2=FUNC(STR1,STR2)
 BEGIN()
  V2T=INT(-1)
  PRTS('CALLF 2 F2 FROM F1  2 PRMS')
  A=NULL()
  A=STRCAT(STR1,STR2)
* PRTS(A)
 PRTS(STR1)
 PRTS(STR2)
 RETURN(A)
 END()
*
******************************************************************************************************************

* Eaxmple of TCP client and Server using thread (ADDTASK)
//SCRDD DD *
  IMPORT('TCPS')      SERVER
  IMPORT('TCPC')      CLIENT
MAIN=FUNC()
BEGIN()
  TRCON()
  PRTS('HI')
* SLEEP(100)
  MYPORT=SINT(0X2800)
  PRT(MYPORT)
  ADDTASK(FSRV,MYPORT,'TCPIP')
  SLEEP(1000)
  PRTS('AFTER SERVER')
  DTCPC=NEW(TCPC,'10.0.0.111',MYPORT,'TCPIP')
  DATA=NEWBYTE(256)
  RC=INT(0)
  SND2TCP=STRING('SHAIX')
LOOPXX=ADDRESS()
  SND2TCP=STRCAT(SND2TCP,'?')
  RC=DTCPC.WRITE(SND2TCP)     BUFF,OFF,LENGTH
  RC=DTCPC.READ(DATA)                 BUFF,OFF, MAX-LENGTH
  BCT(4,LOOPXX)
  PRTS(DATA,0,RC)
  DTCPC.CLOSE()
  EXIT(0)
END()
*
FSRV=FUNC(PORT,TCPNM)
  BEGIN()
  PRTS('IN SERVER')
  PRT(PORT)
  PRTS(TCPNM)
MYTSG=NULL()
  PRTS('NOW TCPS NEW')
  DTCPS=NEW(TCPS,PORT,TCPNM,CALLME,MYTSG)
  PRTS('NOW TCPS END  ')
  DTCPS.CLOSE()
  PRT('OK  TCPS CLOSE')
  RETURN()
CALLME=ADDRESS()
  CALLF(A2,MYTSG,DTCPS)
  EXIT(0)
END()
A2=FUNC(TSG,TCPS.XTCPS)
BEGIN()
 PRTS('IN A2')
 OBJL=INT(0)
 OBJL=OBJLEN(TSG)
 PRT(OBJL)
 PRT(TSG,0,20)
 XTCPS.SETDATA('SHAI: MY NEW DATA TO CLIENT')
EXIT(0)
END()
*
//SYSUDUMP DD SYSOUT=X
*****************************************************************************



*  EXAMPLE TO DISPLAY THE CVT (ADDRESS 0X10)
MAIN=FUNC()
BEGIN()
  XX=UPDPTR(16,32)
  PRT(XX)
  YY=INT(0)
  YY=GETINT(XX)
  ZZ=UPDPTR(YY,20)
  PRT(ZZ)
  RETURN(0)
END()
//SYSUDUMP DD SYSOUT=X





On Mon, Mar 30, 2020 at 5:35 PM John McKown <[email protected]>
wrote:

> On Mon, Mar 30, 2020 at 8:24 AM Allan Staller <[email protected]>
> wrote:
>
> > " Although I reference APL in a previous message, my favorite language
> > back in college was PL/I. I haven't seen either language since. My
> favorite
> > language under MS-DOS was Turbo Pascal. I don't really have a favorite
> any
> > more because I'm being phased out along with z/OS (supposedly by the end
> of
> > this year, but I've not seen anything detailed yet -- guess I'm not
> > important enough to keep informed)."
> >
> > They said that before! <G>
> >
>
> True. But the company which bought us, UnitedHealthcare, is the largest
> health insurance company in the world, $242 billion last year. They have
> the money to just brute force it to work.Whatever. I literally just don't
> care any more, for a number of personal reasons.
>
> --
> People in sleeping bags are the soft tacos of the bear world.
> Maranatha! <><
> John McKown
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>


-- 
Thanks.
Shai

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to