Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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: 4650
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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us