Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ILE RPG difference between v3r1m0 & v3r2m0

169 views
Skip to first unread message

herbert_gr...@sgsgroup.com

unread,
Aug 14, 1998, 3:00:00 AM8/14/98
to
Hello,

Next ILE RPG module compiles under v3r2m0 and not under
v3r1m0. What must I change to get it compiled under v3v1m0?

Or does someone have a CLP solution (I want to check if a file in the
root file system exists, there is no chklnk (like chkobj & chkdlo) command.
(see my current CLP solution at the end off this message)

Greetings, Herbert


* value returned = 0 (OK), -1 (error)
Dstat PR 10I 0 EXTPROC('stat')
* file or directory path
D * VALUE
* struct stat
D * VALUE
*
DRC S 10I 0
DFileNam S 100A INZ('/')
DFileNamP S * INZ(%ADDR(FileNam))
*
DZeroBin S 50A INZ(*ALLX'00')
*
DBuf S 256A
DBufP S * INZ(%ADDR(Buf))
*
*-------------------------------------------------------------
C *ENTRY PLIST
C PARM PIFS 256
C PARM RCCODE 1
*
C EVAL RCCODE='0'
*
C MOVEL(P) PIFS FileNam
*
* get file stats
C EVAL FileNam=%TRIM(FileNam) + ZeroBin
C EVAL RC=stat(FileNamP: BufP)
*
C IF RC=-1
C EVAL RCCODE='1'
C ENDIF
*
C RETURN
*--------------------------------------------------------------
*/*PSSR/* PROGRAM ERROR HANDLING
*--------------------------------------------------------------
C *PSSR BEGSR
C MOVE '*CANCL' RETURN 6
C ENDSR RETURN

The compiler output is:


1 * value returned = 0 (OK), -1 (error)
2 Dstat PR 10I 0 EXTPROC('stat')
======> aa bbbbbbb
*RNF3304 20 a 000200 The Type entry is not valid; defaults to S.
*RNF3308 20 b 000200 Keyword name is not valid; the keyword is ignored.
3 * file or directory path
4 D * VALUE
======> bbbbbbbbbbbbbbb aa ccccc
*RNF3703 20 a 000400 Subfield is not specified within a Data-Structure
definition; Type entry defaults to S.
*RNF3303 30 b 000400 The Name entry is blank for a field definition;
specification is ignored.
*RNF3308 20 c 000400 Keyword name is not valid; the keyword is ignored.
5 * struct stat
6 D * VALUE
======> bbbbbbbbbbbbbbb aa ccccc
*RNF3703 20 a 000600 Subfield is not specified within a Data-Structure
definition; Type entry defaults to S.
*RNF3303 30 b 000600 The Name entry is blank for a field definition;
specification is ignored.
*RNF3308 20 c 000600 Keyword name is not valid; the keyword is ignored.


.....


*RNF7031 00 2 The name or indicator is not referenced.
*RNF3304 20 1 The Type entry is not valid; defaults to S.
*RNF3308 20 3 Keyword name is not valid; the keyword is ignored.
*RNF3703 20 2 Subfield is not specified within a Data-Structure definition;
Type entry defaults to S.
*RNF5377 20 1 The end of the expression is expected.
*RNF3303 30 2 The Name entry is blank for a field definition; specification
is ignored.


I have a CLP solution that works, the bad thing is that it is very slow.


PGM PARM(&ROOT &RET)

DCL VAR(&ROOT) TYPE(*CHAR) LEN(256)
DCL VAR(&RET) TYPE(*CHAR) LEN(1)

CHGVAR VAR(&RET) VALUE('0')

OVRPRTF FILE(QSYSPRT) OUTQ(QUSRSYS/NOPRINT)

DSPLNK OBJ(&ROOT) OUTPUT(*PRINT)
MONMSG MSGID(CPF0000) EXEC(CHGVAR &RET '1')

DLTOVR FILE(QSYSPRT)

ENDPGM


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

Douglas Handy

unread,
Aug 14, 1998, 3:00:00 AM8/14/98
to
Herbert,

>Next ILE RPG module compiles under v3r2m0 and not under
>v3r1m0. What must I change to get it compiled under v3v1m0?

The basic problem is that V3R1 does not support procedures, so you
need to change stat() to either in-line code, a subroutine, or a call
to another program. Note that neither external procedure calls nor
embedded subprocedures are allowed prior to V3R2.

But hey, aren't you glad that CISC processors actually got a release
where they are supported?

Bradley V. Stone

unread,
Aug 15, 1998, 3:00:00 AM8/15/98
to
herbert_gr...@sgsgroup.com wrote:


It looks like you were using a subprocedure. They are not allowed in
V3R1. That's at least one thing from a quick glimpse I took.

Bradley V. Stone
http://prairie.lakes.com/~bvstone
"Closing my my mouth before I scream. No one can shake my self-esteem." - YJM

0 new messages