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
 
Creating Muntiple HEADER and TRAILER

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
AtanuTagore

New User


Joined: 29 May 2009
Posts: 3
Location: Pune, India

PostPosted: Fri May 29, 2009 4:07 pm    Post subject: Creating Muntiple HEADER and TRAILER
Reply with quote

Hi,
Needed some help, I need to use sort to create a Control Card(PS file).
Requirement: The output file should look like:

SIGNON USERID=(XX) ESF=YES CASE=YES
SUBMIT PROC=P1EJMND1 -
&INDSN01='P1EJ.CP000000.PGBR.FFB.AUTH(0)' -
&OUTDSN01='/ftp/whirl_sas/data/0709.hsbc.hbme.cr.aut.'
SIGNOFF


The bold parts
This part would be coming from the 4 bytes from the 24 th position of the input file.

My approach:

[color=red]SORT FIELDS=COPY,
SKIPREC=1
OUTFIL HEADER1=(4:'SIGNON USERID=(XX) ESF=YES ASE=YES'),
NODETAIL,REMOVECC,
HEADER2=(4:'SUBMIT PROC=P1EJMND1 -'),
TRAILER1=(4:'&INDSN01='P1EJ.CP000000.PGBR.FFB.AUTH(0)' -'),
TRAILER2=(4:'INCLUDE COND=(/FTP/WHIRL_SAS/DATA/,''24,4,'',
.HSBC.HBME.CR.AUT')'),
TRAILER3=(4:' SIGNOFF ')


Now when I run the job the error that comes out is:

E1 8 DSS10083E SYNTAX ERROR; ')' WAS EXPECTED.
E2 8 DSS10058E SYNTAX ERROR; PARSING STOPPED AT '' -''.


(I am posting for the 1st time, sry if its not in a proper way.)
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri May 29, 2009 8:44 pm    Post subject:
Reply with quote

I don't know why you're using all of those different HEADER and TRAILER operands. I can't really tell what you're trying to do.

Please show an example of the records in the input file. Also, tell me the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 29, 2009 9:58 pm    Post subject: Reply to: Creating Muntiple HEADER and TRAILER
Reply with quote

Use the following JCL which will give you the desired results. I assumed that you only hae 1 record in your input file and the only fields you are interested is in pos 24 for 4 bytes. You just need the / to create multiple lines


Code:

//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                     
                       0709                                         
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  OPTION COPY,STOPAFT=1                                             
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                             
  HEADER1=('SIGNON USERID=(XX) ESF=YES CASE=YES',/,                 
           'SUBMIT PROC=P1EJMND1 - ',/,                             
           '&INDSN01=''','P1EJ.CP000000.PGBR.FFB.AUTH(0)''',' - ',/,
           '&OUTDSN01=''','/ftp/whirl_sas/data/',24,4,               
           '.hsbc.hbme.cr.aut.''',/,                                 
           'SIGNOFF')                                               
/*
Back to top
View user's profile Send private message
AtanuTagore

New User


Joined: 29 May 2009
Posts: 3
Location: Pune, India

PostPosted: Mon Jun 01, 2009 2:33 pm    Post subject:
Reply with quote

Hi Skolusu/Frank,
Thank you both for your reply, I really appreciate it.

Skolusu, the JCL worked just fine, but I had a couple of questions about the SYSIN:
1) Is OPTION same as SORT FIELDS, here it is used for COPY only can it be used for conditions also?
2) What does BUILD do here?
Thanks again..
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jun 01, 2009 9:22 pm    Post subject:
Reply with quote

AtanuTagore wrote:
Hi Skolusu/Frank,
Thank you both for your reply, I really appreciate it.

Skolusu, the JCL worked just fine, but I had a couple of questions about the SYSIN:
1) Is OPTION same as SORT FIELDS, here it is used for COPY only can it be used for conditions also?
2) What does BUILD do here?
Thanks again..


1. OPTION COPY is equivalent to SORT FIELDS=COPY. STOPAFT=1 says to copy only the first record.

2. The build statement ensures that the output file is created with LRECL=80 (in case your input file does not have LRECL=80).
Back to top
View user's profile Send private message
AtanuTagore

New User


Joined: 29 May 2009
Posts: 3
Location: Pune, India

PostPosted: Tue Jun 02, 2009 9:53 am    Post subject:
Reply with quote

Thank you so much Skolusu, it was a lot of help.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 10 Tue Sep 05, 2017 4:24 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm

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