FSUM7332 syntax error: got (, expecting Newline

JES2/3, JCL, utilities.
Post Reply
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

FSUM7332 syntax error: got (, expecting Newline

Post by demecarv »

I created a very simple shell script with only one line aimed to move a folder. Such shell named test2.sh was created by touch command and after this I gave the permission via chmod 777. I tried to run test2.sh by triggering the JCL JOB pasted below but I got ABENDED S000 U4095 imediately after I runned the JOB and
FSUM7332 in STDERR output. Do I have to add a second line in my shell? If so, what is the purpose and what should I enter to close my shell script?

Code: Select all

test2.sh
000001, mv -r /usr/MyCompany/FROM /usr/MyCompany/TO

Code: Select all

JCL JOB
000001,//E0XXXXXR JOB (XXXXX,TS,4963),MySURNAME,NOTIFY=E0XXXXX,
000002,// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),REGION=2047M
000003,/*JOBPARM SYSAFF=CPUE
000004,//BACKUP   EXEC PGM=IKJEFT01,DYNAMNBR=250,REGION=0M
000005,//SYSTSPRT DD SYSOUT=*
000006,//STDERR   DD SYSOUT=*
000007,//SYSTSIN DD   *
000008, BPXBATCH SH  +
000009, /usr/MyCompany/test2.sh
000010,//BACKUPA  EXEC PGM=MCIABEND,COND=(0,EQ,BACKUP)

Code: Select all

The error after I submitted the JCL above and hit F3
ABENDED S000 U4095

Code: Select all

The error showed in STDERR
DDNAME  StepName
STDERR   BACKUP
/usr/MyCompany/test2.sh 1: FSUM7332 syntax error: got (, expecting Newline
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: FSUM7332 syntax error: got (, expecting Newline

Post by Robert Sample »

Looking at what you posted, the error message indicates you have a left parenthesis somewhere after the /TO in the first line of the shell. This is what needs to be fixed -- adding a second (or third or fourth or ...) line to your shell script isn't likely to help and could worsen things. Can you do a cat /usr/MyCompany/test2.sh and see what Unix thinks is in the file? You could use this JCL:

Code: Select all

//E0XXXXXR JOB (XXXXX,TS,4963),MySURNAME,NOTIFY=E0XXXXX,
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),REGION=2047M
/*JOBPARM SYSAFF=CPUE
//BACKUP   EXEC PGM=IKJEFT01,DYNAMNBR=250,REGION=0M
//SYSTSPRT DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDOUT  DD  SYSOUT=*
//SYSTSIN DD   *
  BPXBATCH cat /usr/MyCompany/test2.sh
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

Re: FSUM7332 syntax error: got (, expecting Newline

Post by demecarv »

I have no idea what I have done wrong. By the way, I created again a file via touch command and it worked. Kindly, see the attachament.
You do not have the required permissions to view the files attached to this post.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: FSUM7332 syntax error: got (, expecting Newline

Post by Robert Sample »

test2.sh looks like it might be ASCII (or at least some other code page) instead of EBCDIC.
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

Re: FSUM7332 syntax error: got (, expecting Newline

Post by demecarv »

Robert, is there a command to show me the file format (e.g. ASCII, EBCDIC and so on)?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: FSUM7332 syntax error: got (, expecting Newline

Post by Robert Sample »

I am not aware of any Unix System Services command that can determine the code set of a file. IBM supplies a wide variety with z/OS (see the XL C/C++ Programming Guide manual for a list of them). The most common ones are IBM-1047 and IBM-037 for EBCDIC and ISO8859-1 for ASCII. Unix System Services command iconv can convert a file from one code set to another but the translation process is pretty much translation table driven (that is, you provide the wrong source code set name and the wrong translation table will be used leading to more unreadable characters). You might try using iconv on your test2.sh to see if you get anything readable out in test2.ebcdic.sh:

Code: Select all

iconv -f ISO8859-1 -t IBM-1047 test2.sh > test2.ebcdic.sh 
The iconv default is to write the output to STDOUT, hence the redirect to test2.ebcdic.sh so the results can be viewed.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”