View previous topic :: View next topic
|
Author |
Message |
Yashashri
New User
Joined: 12 Feb 2016 Posts: 5 Location: India
|
|
|
|
How to Put quotes in Symbolic parameter while expanding file name and file name contains underscore “_”. For example ‘TEST_FILE.text’. In JCL below is the definition of FNM1
FNM1 = TEST_FILE.text this comes from front end dynamically so it doesn’t contain quotes.
While expanding it substitutes the value of FNM1 in PROC in place of &FNM1 but errors with illegal character “_” underscore. But while expanding if I put a quote it works. I tried below code.
//TEMP1 SET QT=''''
//JS000 EXEC COPY,
// HLQ1=ABC,
// HLQ2=CDE,
// CCLIB=ABC.CB.JCL,
// INFILE=&QT&FNM1&QT,
// OUTFILE=&FNM3
//
//*
But while expanding it gives “&FNM1”
Expected is “TET_FILE.text” |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
read carefully the jcl guide and reference manuals for the proper format of dataset names
enclosing the dataset name within quotes will let You use NON COMPLIANT names
but it will break catalog processing and other dataset management functions.
DO NOT DO IT |
|
Back to top |
|
|
Yashashri
New User
Joined: 12 Feb 2016 Posts: 5 Location: India
|
|
|
|
We dont create data set futher we just want to store that information in file for further reference. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
post the FULL message You received!
complete with the message number
or, better
post the sysout |
|
Back to top |
|
|
Yashashri
New User
Joined: 12 Feb 2016 Posts: 5 Location: India
|
|
|
|
It gets triggered from Connect direct and that time the fine name gets replaced ... no sysout for this it gives JCL Error illegal character "_" |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the snippet You posted is a icl snippet,
post the output of the job that was submitted.
or at least the source of the procedure You are trying to use
if You cannot do that no reason to waste more time on the issue |
|
Back to top |
|
|
Yashashri
New User
Joined: 12 Feb 2016 Posts: 5 Location: India
|
|
|
|
Code: |
000001 //XXXXXXX2 JOB 0000,'XXX XXXXXX 02',MSGCLASS=A,REGION=0M,
000002 // CLASS=D,SCHENV='ZZZZ_ZZZ_ZZZZZ',NOTIFY=XXXXXX
000003 /*LOGONID XMTCDE1
000004 //*/*ROUTE PRINT SARLJCL
000005 //JCLLIB JCLLIB ORDER=(ZZZZ.ZZZZ.ZZZZZZZ,ZZZ.ZZZ.ZZZ.ZZZZ)
000006 //*
000007 //*
000008 //* ALTER FILE NAME
000009 //*
000010 //TEMP1 SET QT=''''
000011 //JS000 EXEC FILCOPY,
000012 // HLQ1=TXX,
000013 // HLQ2=TXXX,
000014 // CCLIB=TXX.CXX.JCL.CNTL,
000015 // INFILE=&FNM1,
000016 // OUTFILE=&FNM3
000017 //
000018 //*
000019 //* JOB STARTED VIA C: D FILE TRANSMISSION
000020 //* |
Above job gets triggered from Connect direct tool and that time it send parameter FNM1 & FNM3
FNM1 is customer file name which can have “_” underscore symbol. That name is passed in this job. Now when we pass that name say TEST_FILE it gives JCL error. For using underscore. If somehow we get same name in quotes like “TEST_FILE” then it works fine further.
Now my question is how to put quotes after receiving a file from connect direct. I tried the method which I put in my initial query. If you can suggest something like that.
Let me know any explanation is required.
FILCOPY PROC
Code: |
//FILCOPY PROC OUTFILE=OUT,
// INFILE=IN,
// HLQ1=xxx,
// HLQ2=xxxx
//*
//* COPY FILE
//*
//PS010 EXEC PGM=IDCAMS
//SYSIN DD DSN=&CCLIB(REPRO),DISP=SHR
//INPUT DD DSN=&HLQ1..&INFILE,DISP=SHR
//OUTPUT DD DSN=&HLQ2..&OUTFILE,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(LRECL=4022,RECFM=VB),SPACE=(TRK,(100,200),RLSE)
//SYSPRINT DD SYSOUT=*
//*---------------------------------------------
//PS010SF EXEC PGM=STEPFAIL,COND=(0,EQ,PS010)
//*---------------------------------------------
|
I hope it gives more clarification now |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Now when we pass that name say TEST_FILE it gives JCL error. For using underscore. If somehow we get same name in quotes like “TEST_FILE” then it works fine further.
|
it confirms that my first answer is the right one ...
YOU CANNOT HAVE A DATASET NAME WITH AN UNDERSCORE AMEN
You might not use it but icl does
topic locked |
|
Back to top |
|
|
|