AS400 OS V5R3MO LIBASCII question

When we open the file of binder language statements that controls exports, we are told there is a syntax error on line 1 of that file (not what that error might be, or anything useful like that, just that it exists), then we die because there is no current export block (Which was defined at line 1).  What I see is this:

Why does the binder see a syntax error in the line “STRPGMEXP PGMLVL(*CURRENT)”?.)          



QSH Command Entry                                

$                                                                            
cd /raid1/home/mjm/pdfl5_all                                                
/home/mjm/pdfl5_all                                                          
$                                                                            
gmake STAGE=debug UNAME=M                                                    
[ -d os400 ] || mkdir os400; [ -d os400/debug ] || mkdir os400/debug && ([ -d
os400/debug/APDFL5.0.2 ] || mkdir os400/debug/APDFL5.0.2) && ([ -d os400/deb
ug/APDFL5.0.2/Libs ] || mkdir os400/debug/APDFL5.0.2/Libs) && ([ -d os400/deb
ug/APDFL5.0.2/Samples ] || mkdir os400/debug/APDFL5.0.2/Samples) && ([ -d os4
00/debug/APDFL5.0.2/Resource ] || mkdir os400/debug/APDFL5.0.2/Resource) && (
[ -d os400/debug/APDFL5.0.2/Resource/CMaps ] || mkdir os400/debug/APDFL5.0.2/
Resource/CMaps) && ([ -d os400/debug/APDFL5.0.2/Resource/Fonts ] || mkdir os4
00/debug/APDFL5.0.2/Resource/Fonts) && ([ -d os400/debug/APDFL5.0.2/Include ]
|| mkdir os400/debug/APDFL5.0.2/Include) && ([ -d os400/debug/DLI ] || mkdir                                                              
os400/debug/DLI) && ([ -d os400/debug/DLI/Libs ] || mkdir os400/debug/DLI/Li
bs) && ([ -d os400/debug/DLI/Samples ] || mkdir os400/debug/DLI/Samples) && (
[ -d os400/debug/DLI/Include ] || mkdir os400/debug/DLI/Include)            
ln -sf /qsys.lib/qlibascii.lib/LIBASCII.SRVPGM os400/debug/libASCII.a        
(cd DLVersionInfo && gmake)                                                  
GMAKE[1]: Entering directory `/home/mjm/pdfl5_all/DLVersionInfo'            
export OUTPUTDIR                                                            
[ -d os400 ] || mkdir os400; \                                              
[ -d os400/debug ] || mkdir os400/debug                                      
Created version objects                                                      
GMAKE[1]: Leaving directory `/home/mjm/pdfl5_all/DLVersionInfo'              
(cd bravo/build/bib/gcc2.95 && gmake)  && \                                  
([ -d os400/debug/APDFL5.0.2 ] || mkdir os400/debug/APDFL5.0.2) && ([ -d os40
0/debug/APDFL5.0.2/Libs ] || mkdir os400/debug/APDFL5.0.2/Libs) && ([ -d os40
0/debug/APDFL5.0.2/Samples ] || mkdir os400/debug/APDFL5.0.2/Samples) && ([ -
d os400/debug/APDFL5.0.2/Resource ] || mkdir os400/debug/APDFL5.0.2/Resource)
&& ([ -d os400/debug/APDFL5.0.2/Resource/CMaps ] || mkdir os400/debug/APDFL5
.0.2/Resource/CMaps) && ([ -d os400/debug/APDFL5.0.2/Resource/Fonts ] || mkdi
r os400/debug/APDFL5.0.2/Resource/Fonts) && ([ -d os400/debug/APDFL5.0.2/Incl
ude ] || mkdir os400/debug/APDFL5.0.2/Include) && rm -f os400/debug/APDFL5.0.
2/Libs/libBIB.a && ln -fs /qsys.lib/MDBIBV502.lib/libBIB.srvpgm os400/debug/A
PDFL5.0.2/Libs/libBIB.a                                                      
../../all/unix/common/update_version.sh: 001-0048 Syntax error on line 3: var
iable substitution not valid.                
I Don’t know what this is. But the version objects all properly exist, so I ignored it.                                
GMAKE[1]: Entering directory `/home/mjm/pdfl5_all/bravo/build/bib/gcc2.95'  
GMAKE[1]: *** Warning: File `Makefile' has modification time in the future (1
323806681 > 1323806318)    
This is a reflection of the clock differences between conan and everyone else, It should not be an issue                                                
(export OUTPUTDIR)                                                          
mkdir: 001-2128 Error found creating directory os400_debug. File exists.    
GMAKE[1]: [create_dirs] Error 1 (ignored)                                    
mkdir: 001-2128 Error found creating directory ../../../public/libraries/unix
/os400/debug/dynamic/bib. File exists.                                      
GMAKE[1]: [create_dirs] Error 1 (ignored)                                    
mkdir: 001-2128 Error found creating directory ../../../public/libraries/unix
/os400/debug/static/bib. File exists.                
These are not issues. They are just creating directories that already exist,                      
GMAKE[1]: [create_dirs] Error 1 (ignored)                                    
system CRTSRCPF MDBIBV502/EXPORTS ; \                                        
system ADDPFM FILE\(MDBIBV502/EXPORTS\) MBR\(LIBBIB\) ; \                    
cp BIB.x400 /qsys.lib/MDBIBV502.lib/exports.file/libbib.mbr ; \              
OUTPUTDIR=MDBIBV502 ld -v -qDUPPROC -qDUPVAR -x -qSRCFILE=\(MDBIBV502/EXPORTS
\)   -o ../../../public/libraries/unix/os400/debug/dynamic/bib/libBIB.a os400
_debug/BIBMemory.o os400_debug/BIBLazyTerminate.o os400_debug/BIBMemoryBuffer
.o os400_debug/BRVTimer.o os400_debug/BIBCacheImpl.o os400_debug/BIBContainer
Impl.o os400_debug/BIBErrorImpl.o os400_debug/BIBFilterImpl.o os400_debug/BIB
InternalInit.o os400_debug/BIBMemoryBufferImpl.o os400_debug/BIBMemoryDebugIm
pl.o os400_debug/BIBMemoryImpl.o os400_debug/BIBMethods.o os400_debug/BIBProg
ressImpl.o os400_debug/BIBStreamImpl.o os400_debug/BIBString.o os400_debug/BI
BStringAtomImpl.o os400_debug/BIBAtoms.o os400_debug/BIBObsoleteStreamImpl.o
os400_debug/MemoryPool.o os400_debug/BIBVers.o ../../../../DLVersionInfo/os40
0/debug/LibBIBV.o ../../../../os400/debug/libASCII.a                        
CPF5813:  File EXPORTS in library MDBIBV502 already exists.                  
CPF7302:  File EXPORTS not created in library MDBIBV502.                    
CPF5812:  Member LIBBIB already exists in file EXPORTS in library MDBIBV502.
CPF7306:  Member LIBBIB not added to file EXPORTS in MDBIBV502.
These just say “It’s been done before”.              
command = CRTSRVPGM SRVPGM(MDBIBV502/libBIB_a) MODULE(MDBIBV502/BIBMEMORY MDB
IBV502/BIBLAZYTER MDBIBV502/BIBMEMORYB MDBIBV502/BRVTIMER MDBIBV502/BIBCACHEI
M MDBIBV502/BIBCONTAIN MDBIBV502/BIBERRORIM MDBIBV502/BIBFILTERI MDBIBV502/BI
BINTERNA MDBIBV502/BIBMEMORY0 MDBIBV502/BIBMEMORYD MDBIBV502/BIBMEMORYI MDBIB
V502/BIBMETHODS MDBIBV502/BIBPROGRES MDBIBV502/BIBSTREAMI MDBIBV502/BIBSTRING
MDBIBV502/BIBSTRINGA MDBIBV502/BIBATOMS MDBIBV502/BIBOBSOLET MDBIBV502/MEMOR
YPOOL MDBIBV502/BIBVERS MDDLV502/LIBBIBV ) BNDSRVPGM(QLIBASCII/LIBASCII ) EXP
ORT(*SRCFILE) SRCFILE((MDBIBV502/EXPORTS)) OPTION(*DUPPROC *DUPVAR ) TEXT('ic
/libraries/unix/os400/debug/dynamic/bib/libBIB.a')                          
Definition supplied multiple times for symbol 'GetInstanceData__H16SimpleStre
amImpl_P9ContainerRC10StringAtom_P16SimpleStreamImpl'.                      
Definition supplied multiple times for symbol 'GetInstanceData__H16SimpleStre
amImpl_P9ContainerRC10StringAtom_P16SimpleStreamImpl'.                      
Definition supplied multiple times for symbol 'GetInstanceData__H16SimpleStre
amImpl_P9ContainerRC10StringAtom_P16SimpleStreamImpl'.                      
Definition supplied multiple times for symbol 'GetInstanceData__H16SimpleStre
amImpl_P9ContainerRC10StringAtom_P16SimpleStreamImpl'.        
These would be an error, except for the option *DUPPROC, which says to ignore them.              
MDBIBV502/EXPORTS.LIBBIB_A line 1: ***ERROR Syntax not valid.
This is the fatal error.                
MDBIBV502/EXPORTS.LIBBIB_A line 1: ***ERROR No 'current' export block        
Binder language compilation failed with 2 errors and 0 warnings.            

GMAKE[1]: *** [../../../public/libraries/unix/os400/debug/dynamic/bib/libBIB.
a] Error 1                                                                  
GMAKE[1]: Leaving directory `/home/mjm/pdfl5_all/bravo/build/bib/gcc2.95'    
GMAKE: *** [mybib] Error 2                                                  
$  


  The binding language block looks like this: (It is in pdfl5_all/bravo/build/bib/gcc2.95/BIB.x400)
STRPGMEXP PGMLVL(*CURRENT)
  EXPORT SYMBOL("BIBGetVersion")
  EXPORT SYMBOL("BIBInitialize")
  EXPORT SYMBOL("BIBTerminate")
  EXPORT SYMBOL("BIBGetGetProcAddress")
  EXPORT SYMBOL("BIBInitialize2")
  EXPORT SYMBOL("BIBInitialize3")
  EXPORT SYMBOL("BIBInitialize4")
  EXPORT SYMBOL("_DL_GET_BIB_VER")
ENDPGMEXP

    I considered that it may not be translated correctly, but when I open it with an editor on the OS400 side, it reads exactly the same.

    I looked for how the pdfl7 build did the same thing, and found nothing. It does not have the same construct, and in fact, it does not use the same linker. In the pdfl7 makefile, the linker is defined as /apdfltools/Acrtsrvpgm. I was just starting to look at that last night.

dlt63Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
Please post the contents of binder source member MDBIBV502/EXPORTS.LIBBIB_A


- Gary Patterson



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tliottaCommented:
when I open it with an editor on the OS400 side

When you open "what" and with what "editor"?

cp BIB.x400 /qsys.lib/MDBIBV502.lib/exports.file/libbib.mbr ; \

I probably wouldn't use cp to do that copy, but I don't know the exact content of BIB.x400. I'd probably use the CPYFRMSTMF system command instead. Details like end-of-line characters are not going to be handled well when copying into a database member.

Tom
0
dlt63Author Commented:
Good Answer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.