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
 

 

Syncsort get the input file name on the SYSOUT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort get the input file name on the SYSOUT
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

Moderator Team Head


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

PostPosted: Sat Sep 26, 2009 1:12 am    Post subject: Reply to: Syncsort get the input file name on the SYSOUT
Reply with quote

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

http://www.ibmmainframes.com/viewtopic.php?t=39144
http://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    Post subject:
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

Moderator Team Head


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

PostPosted: Sat Sep 26, 2009 1:54 am    Post subject: Reply to: Syncsort get the input file name on the SYSOUT
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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