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

Syncsort get the input file name on the SYSOUT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Sat Sep 26, 2009 1:05 am
Reply with quote

Hi All,

Please find the requirement below.

Input file Name :- Z1VPRTL.DET.ACCT.FILE

This is a variable block file with a record length of 2128 bytes.

Input file has a lot of contents but here need only one field at postion 13.

Code:

123456 
123456 
654321 
654321 


Output File should contain the following informations:-

Code:

Z1VPRTL.DET.ACCT.FILE  123456 
Z1VPRTL.DET.ACCT.FILE  654321 


need to get the input file name as well as the unique value from the input file.

like wise, have alot of input files and all needs to be formatted in this way.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Sep 26, 2009 1:12 am
Reply with quote

Use the SYMNAMES DD as shown in these two example topics:

www.ibmmainframes.com/viewtopic.php?t=39144
www.ibmmainframes.com/viewtopic.php?t=42779
Back to top
View user's profile Send private message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Sat Sep 26, 2009 1:33 am
Reply with quote

Thanks alot for your quick response.

I found one thing from the topic lists that you gave me,

Code:

//STEP1  EXEC PGM=SORT
//SORTIN   DD DSN=input.file
//SORTOUT  DD DSN=output.file
//SYSOUT   DD SYSOUT=*
//SYMNAMES DD *       
JOBNAME,S'&JOBNAME'   
//SYSIN    DD *               
  SORT FIELDS=COPY         
  OUTFIL TRAILER1=(JOBNAME)
/*


here we can get the job name using SYMNAMES.

Can you please let me know how to get the input file name what we give in the DSN?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Sep 26, 2009 1:54 am
Reply with quote

You're either going to have to pass it as a hardcoded value in the SYMNAMES DD, as a parameter to some program via the PARM= statement, or you'll have to write a program that can perform a lookup and conversion of a DDNAME to the actual dataset name associated with it (i.e. tracing down the JFCB storage blocks for your job). All of these methods have been covered in some depth in other topics. You just need to decide which method you want to pursue and what programming langauges or other develoment tools you have at your disposal to use.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top