View previous topic :: View next topic
|
Author |
Message |
raj12vel
New User
Joined: 20 Dec 2008 Posts: 43 Location: New Jersey
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
raj12vel
New User
Joined: 20 Dec 2008 Posts: 43 Location: New Jersey
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
|