IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Put quotes in Symbolic parameter while expanding file name


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Yashashri

New User


Joined: 12 Feb 2016
Posts: 5
Location: India

PostPosted: Mon Feb 15, 2016 12:24 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 15, 2016 12:32 pm
Reply with quote

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
View user's profile Send private message
Yashashri

New User


Joined: 12 Feb 2016
Posts: 5
Location: India

PostPosted: Mon Feb 15, 2016 12:40 pm
Reply with quote

We dont create data set futher we just want to store that information in file for further reference.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 15, 2016 12:46 pm
Reply with quote

post the FULL message You received!
complete with the message number
or, better
post the sysout
Back to top
View user's profile Send private message
Yashashri

New User


Joined: 12 Feb 2016
Posts: 5
Location: India

PostPosted: Mon Feb 15, 2016 2:33 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 15, 2016 2:42 pm
Reply with quote

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
View user's profile Send private message
Yashashri

New User


Joined: 12 Feb 2016
Posts: 5
Location: India

PostPosted: Mon Feb 15, 2016 2:59 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 15, 2016 3:23 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
Search our Forums:

Back to Top