Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Put quotes in Symbolic parameter while expanding file name

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

New User


Joined: 12 Feb 2016
Posts: 4
Location: India

PostPosted: Mon Feb 15, 2016 12:24 pm    Post subject: Put quotes in Symbolic parameter while expanding file name
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Feb 15, 2016 12:32 pm    Post subject: Reply to: Put quotes in Symbolic parameter while expanding file name
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: 4
Location: India

PostPosted: Mon Feb 15, 2016 12:40 pm    Post subject: Reply to: Put quotes in Symbolic parameter while expanding file name
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Feb 15, 2016 12:46 pm    Post subject: Reply to: Put quotes in Symbolic parameter while expanding file name
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: 4
Location: India

PostPosted: Mon Feb 15, 2016 2:33 pm    Post subject: Reply to: Put quotes in Symbolic parameter while expanding file name
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Feb 15, 2016 2:42 pm    Post subject: Reply to: Put quotes in Symbolic parameter while expanding file name
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: 4
Location: India

PostPosted: Mon Feb 15, 2016 2:59 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Feb 15, 2016 3:23 pm    Post subject: Reply to: Put quotes in Symbolic parameter while expanding file name
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.    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us